I am having difficulties testing Controllers in Codeigniter:
I use Toast but when I invoke my Home Controller class I get an exception that "db" is not defined. Has anybody an idea how to
test this 1-1?
Thanks
class Home_tests extends Toast {
function __construct() {
parent::__construct(__FILE__);
// Load any models, libraries etc. you need here
}
function test_select_user() {
$controller = new Home();
$controller->getDbUser('
[email protected]','password');
assert($query->num_rows() == 0 );
}
}