CRM-17860 - Use phpunit4
authorTim Otten <totten@civicrm.org>
Tue, 2 Feb 2016 05:30:56 +0000 (22:30 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 2 Feb 2016 07:33:51 +0000 (00:33 -0700)
tests/phpunit/CiviTest/CiviUnitTestCase.php
tools/scripts/phpunit

index 9cbb5d7a0788662299efd0cdfce0de8586ca53dd..630ff41c3b7ba2822b9b34aa5165989432ee3a61 100755 (executable)
@@ -411,7 +411,6 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
 
     $this->cleanTempDirs();
     $this->unsetExtensionSystem();
-    $this->clearOutputBuffer();
   }
 
   /**
@@ -3221,12 +3220,6 @@ AND    ( TABLE_NAME LIKE 'civicrm_value_%' )
     }
   }
 
-  public function clearOutputBuffer() {
-    while (ob_get_level() > 0) {
-      ob_end_clean();
-    }
-  }
-
   /**
    * Assert the attachment exists.
    *
index 30a3831c8a424537df7937eaf19e64e4d55775e2..634f2bc386b6caf62cf36d7b44e11c46a400f283 100755 (executable)
@@ -14,7 +14,10 @@ if (PHP_SAPI !== 'cli') {
   die("phpunit can only be run from command line.");
 }
 
-$phpunit = findCommand('phpunit');
+$phpunit = findCommand('phpunit4');
+if (!$phpunit) {
+  $phpunit = findCommand('phpunit');
+}
 if (!$phpunit) {
   echo "Plesae ensure that:\n";
   echo " * PHPUnit is installed.\n";