Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 1 | <?php |
2 | |||||
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 3 | class Mock_Core_URI extends CI_URI { |
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 4 | |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 5 | public function __construct() |
6 | { | ||||
7 | $test = CI_TestCase::instance(); | ||||
8 | $cls =& $test->ci_core_class('cfg'); | ||||
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 9 | |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 10 | // set predictable config values |
11 | $test->ci_set_config(array( | ||||
12 | 'index_page' => 'index.php', | ||||
13 | 'base_url' => 'http://example.com/', | ||||
14 | 'subclass_prefix' => 'MY_' | ||||
15 | )); | ||||
16 | |||||
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 17 | $this->config = new $cls; |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 18 | |
19 | } | ||||
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 20 | |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 21 | protected function _is_cli_request() |
22 | { | ||||
23 | return FALSE; | ||||
24 | } | ||||
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 25 | |
Taufan Aditya | ca16c4f | 2012-03-28 15:15:30 +0700 | [diff] [blame] | 26 | } |