Welcome Guest, Not a member yet? Register   Sign In
set_test_items not effecting unit test report output
#1

[eluser]TaylorOtwell[/eluser]
I am running CodeIgniter 2.0 and I have the following code in the index function of a controller that runs my unit tests.

Code:
$this->unit->set_test_items(array('test_name', 'result'));

$this->_test_user_lib();
$this->_test_user_model();

echo $this->unit->report();

This doesn't effect the output the report. The report still shows all of the possible items (filename, line number, etc.) Am I doing it wrong?

I even did a var_dump() in the "report" method of the unit test library and the array is of visible items is being set correctly, but still no change to the report.

Any help is greatly appreciated. I feel like I'm missing something obvious!
#2

[eluser]TaylorOtwell[/eluser]
Well, it seems that if I echo every $this->test->run() as I go it only shows what I want it to. But, just doing a $this->unit->report() shows everything regardless of the visible_items array. Is this the expected behavior?




Theme © iAndrew 2016 - Forum software by © MyBB