Batch 1: base project files

This commit is contained in:
sas.fajri
2026-04-15 15:12:37 +07:00
parent 74c29eb250
commit e224e7f31a
57 changed files with 5766 additions and 0 deletions

32
tests/mocks/core/uri.php Executable file
View File

@@ -0,0 +1,32 @@
<?php
class Mock_Core_URI extends CI_URI {
public function __construct()
{
$test = CI_TestCase::instance();
$cls =& $test->ci_core_class('cfg');
// set predictable config values
$test->ci_set_config(array(
'index_page' => 'index.php',
'base_url' => 'http://example.com/',
'subclass_prefix' => 'MY_',
'enable_query_strings' => FALSE,
'permitted_uri_chars' => 'a-z 0-9~%.:_\-'
));
$this->config = new $cls;
if ($this->config->item('enable_query_strings') !== TRUE OR is_cli())
{
$this->_permitted_uri_chars = $this->config->item('permitted_uri_chars');
}
}
public function _set_permitted_uri_chars($value)
{
$this->_permitted_uri_chars = $value;
}
}