[eluser]ColonelChlorine[/eluser]
Does anyone have tips on how to access the CodeIgniter database classes/functions directly? I am working with PHPUnit and trying to test some of my classes that depend on
Code:
$CI =& get_instance();
$CI->db->query('blahblahblah');
It's not
actually like that, because I use dependency injection to put the database into each class ... but in princple I need access to the fully instantiated class normally referenced by:
I don't need the rest of the MVC framework, just the database functionality. I have tried things like requiring just the config/database.php file, and the system/database/DB.php, and working with that ... but it seems everything is so woven together I can't access the database without loading the entire framework. Gah!
Am I up !@#% creek? Looking forward to ideas/responses.