Q:

Setting test items in CodeIgniter Unit Test not effecting report output

I'm running CodeIgniter 2.0 and I have a test controller setup with this code in the index function. It seems like no matter what I put in the "set_test_items" variable, the report never changes. It always show all of the possible information regarding the test. I feel like I must be missing something blatantly obvious here. What am I missing?
    $this->unit->set_test_items(array('test_name', 'result'));

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

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

Also, I just tried to var_dump() on the visible items when the report is generated and the array only contains the two things I passed in, so it is being set correctly.

A:

The set_test_items() affects only the run() methods, not report(). The following code will show only the items you specified in set_test_items():
echo $this->unit->run(1 + 1, 2, 'One plus one');

But the following will show all items:
echo $this->unit->report();

Hope this helps.

