summaryrefslogtreecommitdiffstats
path: root/tests/mocks/core/uri.php
blob: 207c7dc41c4c66309d4089d5e2880e008c445745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

require BASEPATH.'core/URI.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_'
		));

		$this->config = new $cls;	

	}
	
	protected function _is_cli_request()
	{
		return FALSE;
	}
}