From 45eb0f99f72e26c9dfd639a7222c7435d13fe8d3 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Wed, 23 Jan 2013 14:30:08 +1300 Subject: [PATCH] FIX PHPUnit latest not working with composer installed builds When using composer, we must rely on the composer autoloader to load in PHPUnit and not try do to so ourselves, as the old PHPUnit\Autoload.php file doesnt understand how to find things in vendor --- dev/phpunit/PhpUnitWrapper_3_5.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dev/phpunit/PhpUnitWrapper_3_5.php b/dev/phpunit/PhpUnitWrapper_3_5.php index 3085ad572..13974225c 100644 --- a/dev/phpunit/PhpUnitWrapper_3_5.php +++ b/dev/phpunit/PhpUnitWrapper_3_5.php @@ -20,12 +20,14 @@ class PhpUnitWrapper_3_5 extends PhpUnitWrapper { * Initialise the wrapper class. */ public function init() { - require_once 'PHP/CodeCoverage.php'; - require_once 'PHP/CodeCoverage/Report/HTML.php'; + if(!class_exists('PHPUnit_Framework_TestCase')) { + require_once 'PHP/CodeCoverage.php'; + require_once 'PHP/CodeCoverage/Report/HTML.php'; - require_once 'PHPUnit/Autoload.php'; + require_once 'PHPUnit/Autoload.php'; - require_once 'PHP/CodeCoverage/Filter.php'; + require_once 'PHP/CodeCoverage/Filter.php'; + } } /**