Problem with CIUnit fooLoader.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Problem with CIUnit fooLoader.php (/showthread.php?tid=19243) |
Problem with CIUnit fooLoader.php - El Forum - 06-01-2009 [eluser]pinksy[/eluser] Hi, I've been trying to use CIUnit to test a model. I've gone back to basics, and tried to get the example "testSomeModel.php" to work, but it falls over when calling CIUnit_TestCase.dbfixt I have an "_test" database group set up. Here is the contents of my database.php: Code: $env_used = 'default'; //where default would be the name of your development setting I have 'database' set to autoload in config/autoload.php: Code: $autoload['libraries'] = array('database'); I also have a Product_model.php, and I have the fixtures ready to go. However, when running the test, I get this: Code: <h4>A PHP Error was encountered</h4> Looking at the load function in Fixture.php, it seems that $this->CI->db->database is empty. By adding $this->CI->load->database() to the top of the function, it seems to work: Code: function load($table, $fixt) Does this suggest that fooLoader.php is not autoloading properly? I'm using CI v1.7.1 and fooStack v0.15 Thanks in advance |