Ticket #91: PHPUnitTask-PHPUnit3check.diff
| File PHPUnitTask-PHPUnit3check.diff, 1.1 KB (added by DougWarner <silfreed-phing@…>, 5 years ago) |
|---|
-
.php
old new 78 78 else 79 79 { 80 80 /** 81 * Try to find PHPUnit3 82 */ 83 @include_once 'PHPUnit/Util/Filter.php'; 84 if (class_exists('PHPUnit_Util_Filter')) 85 { 86 PHPUnitUtil::$installedVersion = 3; 87 } 88 89 /** 81 90 * Try to find PHPUnit2 82 91 */ 83 require_once 'PHPUnit2/Util/Filter.php'; 92 else 93 { 94 @include_once 'PHPUnit2/Util/Filter.php'; 84 95 85 96 if (!class_exists('PHPUnit2_Util_Filter')) { 86 97 throw new BuildException("PHPUnit2Task depends on PEAR PHPUnit2 package being installed.", $this->getLocation()); … … 88 99 89 100 PHPUnitUtil::$installedVersion = 2; 90 101 } 102 if (!class_exists('PHPUnit_Util_Filter') 103 && !class_exists('PHPUnit2_Util_Filter')) 104 { 105 throw new BuildException("PHPUnit Task depends on PHPUnit2 or PHPUnit3 being installed", $this->getLocation()); 106 } 107 } 91 108 92 109 // other dependencies that should only be loaded when class is actually used. 93 110 require_once 'phing/tasks/ext/phpunit/PHPUnitTestRunner.php';
