[FEATURE] add phpunit code coverage

This commit is contained in:
Marco Stoll 2019-06-25 14:36:31 +02:00
parent aa7f28563f
commit b855c0062d
5 changed files with 18 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.idea/
/build
/logs
/vendor
composer.lock

View File

@ -0,0 +1,3 @@
@ECHO OFF
SET PROJECT_HOME=C:\dev\ffe\fastforward\Utils
php -dxdebug.coverage_enable=1 %PROJECT_HOME%\vendor\phpunit\phpunit\phpunit --coverage-xml %PROJECT_HOME%\logs\phpunit --configuration %PROJECT_HOME%\tests\testsuite.xml --teamcity

View File

@ -103,11 +103,10 @@
<!-- <coverage path="" /> -->
<!-- @path - the directory where the xml code coverage report can be found -->
<!--</source>-->
<!--
<source type="phpunit">
<filter directory="${phpDox.project.source}" />
<coverage path="../logs/phpunit" />
</source>
-->
</enrich>

View File

@ -47,4 +47,12 @@ class ClassUtilsTest extends TestCase
$className = ClassUtils::getLocalClassName(__CLASS__);
$this->assertEquals(__CLASS__, ClassUtils::findFQClassName($className, [__NAMESPACE__]));
}
/**
* Test the namesake method
*/
public function testFindFQClassNameUnknown()
{
$this->assertNull(ClassUtils::findFQClassName('Exception', [__NAMESPACE__]));
}
}

View File

@ -5,4 +5,9 @@
<directory>./</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../src/</directory>
</whitelist>
</filter>
</phpunit>