diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:08:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:08:40 +0200 |
commit | 89db8ee4c16c5cdd589e51f27fcd3fc23cf41aae (patch) | |
tree | 0a667b4e332fe5181bba4531d025740bc892821a /tests | |
parent | cbd78d826b965ad6dfc953686594749cbdf21af3 (diff) | |
parent | d580999cead0aa37d705c2f32e02712a2d522deb (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/db_subdrivers
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/database/query_builder/get_test.php | 2 | ||||
-rw-r--r-- | tests/mocks/autoloader.php | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/codeigniter/database/query_builder/get_test.php b/tests/codeigniter/database/query_builder/get_test.php index 699d2906a..156027537 100644 --- a/tests/codeigniter/database/query_builder/get_test.php +++ b/tests/codeigniter/database/query_builder/get_test.php @@ -41,7 +41,7 @@ class Get_test extends CI_TestCase { */ public function test_get_where() { - $job1 = $this->db->get('job', array('id' => 1))->result_array(); + $job1 = $this->db->get_where('job', array('id' => 1))->result_array(); // Dummy jobs contain 1 rows $this->assertCount(1, $job1); diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index e3ff7a8bd..be1c2220c 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -69,16 +69,21 @@ function autoload($class) } } - $file = isset($file) ? $file : $dir.$class.'.php'; + $file = (isset($file)) ? $file : $dir.$class.'.php'; if ( ! file_exists($file)) { $trace = debug_backtrace(); - // If the autoload call came from `class_exists` or `file_exists`, - // we skipped and return FALSE if ($trace[2]['function'] === 'class_exists' OR $trace[2]['function'] === 'file_exists') { + // If the autoload call came from `class_exists` or `file_exists`, + // we skipped and return FALSE + return FALSE; + } + elseif (($autoloader = spl_autoload_functions()) && end($autoloader) !== __FUNCTION__) + { + // If there was other custom autoloader, passed away return FALSE; } |