blob: 94f75df6483d6ea528bb0a899280ec85b5011034 [file] [log] [blame]
Taufan Adityaca16c4f2012-03-28 15:15:30 +07001<?php
2
Taufan Adityaca16c4f2012-03-28 15:15:30 +07003class Mock_Core_URI extends CI_URI {
Andrey Andreevf243ce12012-06-09 23:34:21 +03004
Taufan Adityaca16c4f2012-03-28 15:15:30 +07005 public function __construct()
6 {
7 $test = CI_TestCase::instance();
8 $cls =& $test->ci_core_class('cfg');
Andrey Andreevf243ce12012-06-09 23:34:21 +03009
Taufan Adityaca16c4f2012-03-28 15:15:30 +070010 // 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 Andreevf243ce12012-06-09 23:34:21 +030017 $this->config = new $cls;
Taufan Adityaca16c4f2012-03-28 15:15:30 +070018
19 }
Andrey Andreevf243ce12012-06-09 23:34:21 +030020
Taufan Adityaca16c4f2012-03-28 15:15:30 +070021 protected function _is_cli_request()
22 {
23 return FALSE;
24 }
Andrey Andreevf243ce12012-06-09 23:34:21 +030025
Taufan Adityaca16c4f2012-03-28 15:15:30 +070026}