Commits

Greg Aker committed e70ef4a

config CI_Loader tests.

Comments (0)

Files changed (1)

tests/codeigniter/core/Loader_test.php

 			'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'));
 	}
 
 	// --------------------------------------------------------------------
 
 	// --------------------------------------------------------------------
 
-	// 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);
+	}
 
-
-
+	// --------------------------------------------------------------------
+	
+	
+	
+	
+}