... Method MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions() does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
I want create coverage reports for the PHP_CodeSniffer itself, their sniffs and my own sniffs.
So I call phpunit from the commandline:
phpunit --coverage-clover=/results/PHPUnit/Clover/clover.xml --verbose /PHP_CodeSniffer/tests/AllTests.php
but I got the error mentioned above with this stack trace:
#0 /usr/lib/php/PHP/CodeCoverage/Util.php(218): ReflectionMethod->construct('MySource_Tests...', 'DisallowSelfAct...')
#1 /usr/lib/php/PHP/CodeCoverage.php(502): PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests...', 'DisallowSelfAct...')
#2 /usr/lib/php/PHP/CodeCoverage.php(236): PHP_CodeCoverage->applyCoversAnnotationFilter(Array, Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
#3 /Users/sok/Sites/projekte/t3dev/forge/hudson/hudson-helpers/tools/PHPUnit/PHPUnit-3.5/PHPUnit/Framework/TestResult.php(642): PHP_CodeCoverage->append(Array, Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
#4 /Users/sok/Sites/projekte/t3dev/forge/hudson/hudson-helpers/tools/PHPUnit/PHPUnit-3.5/PHPUnit/Framework/TestCase.php(599): PHPUnit_Framework_TestResult->run(Object(MySource in /usr/lib/php/PHP/CodeCoverage/Util.php on line 218
PHPUnit expect an function inside the *UnitTest.php file, but there is none. Writing tests for PHP_CodeSniffer sniffs are a little bit different, so there is no method with this name necessary.
If I call phpunit alone, all test will execute.