If you add
'is_object',
to the array on line 62 of libraries/Unit_test.php, you can use objects as a validation type for unit testing. This is essential to me, as we’re loading application configuration into an object that is loaded as a property of the CI superglobal. We test that configuration is loaded correctly by testing that the method returns an object.
Line 62 of libraries/Unit_test.php should now read:
if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null'), TRUE))
The method call in our unit testing framework is:
$this->unit->run(Config::load(), 'is_object', 'Load Config');
It would be most excellent if this was committed.
