PHPUnit provides a filter util to mark a piece of code as test fixture. This makes the template disappear from the coverage report and helps a lot to keep the code coverage report readable and clean. In case of Smarty you just use the builtin php-tag to execute native PHP calls:
{php}PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'TESTS');{/php}
Filed under PHP, PHPUnit, Smarty, Unit testing & no comments & no trackbacks
Trackback specific URI for this entry