From 4d2bb09cbb4fc66dc4881c2ffdeee7dbaf0a3a3b Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Thu, 21 Apr 2011 12:33:12 -0500 Subject: config CI_Loader tests. --- tests/codeigniter/core/Loader_test.php | 36 +++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'tests/codeigniter') diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 1e32c7e0a..55ab9a4e5 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -195,8 +195,8 @@ class Loader_test extends CI_TestCase { 'foo' => 'bar' ); - $this->assertEquals(NULL, $this->load->vars($vars)); - $this->assertEquals(NULL, $this->load->vars('foo', 'bar')); + $this->assertNull($this->load->vars($vars)); + $this->assertNull($this->load->vars('foo', 'bar')); } // -------------------------------------------------------------------- @@ -230,12 +230,30 @@ class Loader_test extends CI_TestCase { // -------------------------------------------------------------------- - // public function testLoadConfig() - // { - // $this->assertEquals(NULL, $this->load->config('config', FALSE, TRUE)); - // } -} - - + public function testLoadConfig() + { + $this->_setup_config_mock(); + + $this->assertNull($this->load->config('config', FALSE)); + } + + // -------------------------------------------------------------------- + public function testLoadBadConfig() + { + $this->_setup_config_mock(); + + $this->setExpectedException( + 'Exception', + 'CI Error: The configuration file foobar.php does not exist.' + ); + + $this->load->config('foobar', FALSE); + } + // -------------------------------------------------------------------- + + + + +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b