adds vendor and library dirs to code coverage blacklist
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 29 Apr 2016 08:19:00 +0000 (10:19 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 29 Apr 2016 09:18:33 +0000 (11:18 +0200)
* ... in phpunit.xml
* it seems that setting this in TestServer is not working
 any longer -> should be investigated

Change-Id: Ib1da96d64a689ad09b1c1bf61cdd67d46f520e2c
Reviewed-on: http://gerrit.tine20.com/customers/3113
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/TestServer.php
tests/tine20/phpunit.xml

index ca540f5..dd49b1d 100644 (file)
@@ -91,11 +91,13 @@ class TestServer
     public function setWhiteAndBlacklists()
     {
         if ($this->isPhpunitVersionGreaterOrEquals("3.6.0")) {
+            // TODO not sure if this is working - we need to validate that
             $filter = new PHP_CodeCoverage_Filter();
             $filter->addDirectoryToBlacklist(PATH_TO_TEST_DIR);
             $filter->addDirectoryToBlacklist(PATH_TO_TINE_LIBRARY);
             $filter->addDirectoryToBlacklist(PATH_TO_REAL_DIR.'/Setup');
             $filter->addDirectoryToBlacklist(PATH_TO_REAL_DIR.'/Zend');
+            $filter->addDirectoryToBlacklist(PATH_TO_REAL_DIR.'/vendor');
         } else if ($this->isPhpunitVersionGreaterOrEquals("3.5.0")) {
             PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PATH_TO_TEST_DIR);
             PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PATH_TO_TINE_LIBRARY);
index e3707f1..0e3a56e 100644 (file)
     <listeners>
         <listener class="LogListener" file="LogListener.php" />
     </listeners>
+    <filter>
+        <!-- code coverage blacklisting -->
+        <blacklist>
+            <directory>../../tine20/vendor</directory>
+            <directory>../../tine20/library</directory>
+        </blacklist>
+    </filter>
 </phpunit>
\ No newline at end of file