summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Loader_test.php
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2011-04-21 19:33:12 +0200
committerGreg Aker <greg.aker@ellislab.com>2011-04-21 19:33:12 +0200
commit4d2bb09cbb4fc66dc4881c2ffdeee7dbaf0a3a3b (patch)
tree383feeff6f395cdc944a261f7a68b0eff48878aa /tests/codeigniter/core/Loader_test.php
parent6858fb92133afa127eff6f11dd29abf554e1b2d1 (diff)
config CI_Loader tests.
Diffstat (limited to 'tests/codeigniter/core/Loader_test.php')
-rw-r--r--tests/codeigniter/core/Loader_test.php36
1 files changed, 27 insertions, 9 deletions
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