From ca16c4ff1aa0cf5ebfbe877e9be755c0b7d2061c Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Wed, 28 Mar 2012 15:15:30 +0700 Subject: Adding autoloader and mocks directory --- tests/mocks/core/uri.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/mocks/core/uri.php (limited to 'tests/mocks/core/uri.php') diff --git a/tests/mocks/core/uri.php b/tests/mocks/core/uri.php new file mode 100644 index 000000000..207c7dc41 --- /dev/null +++ b/tests/mocks/core/uri.php @@ -0,0 +1,27 @@ +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; + } +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ac5373a8979537f5454af6b911108541140a35d7 Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Wed, 28 Mar 2012 16:03:38 +0700 Subject: Adding core and libraries mock classes --- tests/mocks/core/uri.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/mocks/core/uri.php') diff --git a/tests/mocks/core/uri.php b/tests/mocks/core/uri.php index 207c7dc41..b6946091e 100644 --- a/tests/mocks/core/uri.php +++ b/tests/mocks/core/uri.php @@ -1,7 +1,5 @@ Date: Sat, 9 Jun 2012 23:34:21 +0300 Subject: Cleanup/optimize tests/mocks/ --- tests/mocks/core/uri.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/mocks/core/uri.php') diff --git a/tests/mocks/core/uri.php b/tests/mocks/core/uri.php index b6946091e..94f75df64 100644 --- a/tests/mocks/core/uri.php +++ b/tests/mocks/core/uri.php @@ -1,12 +1,12 @@ ci_core_class('cfg'); - + // set predictable config values $test->ci_set_config(array( 'index_page' => 'index.php', @@ -14,12 +14,13 @@ class Mock_Core_URI extends CI_URI { 'subclass_prefix' => 'MY_' )); - $this->config = new $cls; + $this->config = new $cls; } - + protected function _is_cli_request() { return FALSE; } + } \ No newline at end of file -- cgit v1.2.3-24-g4f1b