From 20a7a2bec341589222ba75afc77bdc728a3d61c0 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 1 Feb 2016 22:30:56 -0700 Subject: [PATCH] CRM-17860 - Use phpunit4 --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 7 ------- tools/scripts/phpunit | 5 ++++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 9cbb5d7a07..630ff41c3b 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -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. * diff --git a/tools/scripts/phpunit b/tools/scripts/phpunit index 30a3831c8a..634f2bc386 100755 --- a/tools/scripts/phpunit +++ b/tools/scripts/phpunit @@ -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"; -- 2.25.1