From 25a2f1b60aea9ee39b649201eaf5a4c3419f4a1c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 13 Jan 2007 02:15:19 +0000 Subject: [PATCH] adjust CleanUpTest to run with PHPUnit 3 --- includes/normal/CleanUpTest.php | 20 +++++++------------- includes/normal/README | 4 ++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/includes/normal/CleanUpTest.php b/includes/normal/CleanUpTest.php index 30ec6a95fc..b7c97275af 100644 --- a/includes/normal/CleanUpTest.php +++ b/includes/normal/CleanUpTest.php @@ -38,20 +38,15 @@ if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) { #ini_set( 'memory_limit', '40M' ); -require_once( 'PHPUnit.php' ); -require_once( 'UtfNormal.php' ); +require_once 'PHPUnit/Framework.php'; +require_once 'PHPUnit/TextUI/TestRunner.php'; + +require_once 'UtfNormal.php'; /** * @package UtfNormal */ -class CleanUpTest extends PHPUnit_TestCase { - /** - * @param $name String: FIXME - */ - function CleanUpTest( $name ) { - $this->PHPUnit_TestCase( $name ); - } - +class CleanUpTest extends PHPUnit_Framework_TestCase { /** @todo document */ function setUp() { } @@ -412,9 +407,8 @@ class CleanUpTest extends PHPUnit_TestCase { } -$suite = new PHPUnit_TestSuite( 'CleanUpTest' ); -$result = PHPUnit::run( $suite ); -echo $result->toString(); +$suite = new PHPUnit_Framework_TestSuite( 'CleanUpTest' ); +$result = PHPUnit_TextUI_TestRunner::run( $suite ); if( !$result->wasSuccessful() ) { exit( -1 ); diff --git a/includes/normal/README b/includes/normal/README index f8207a1b2e..a17aa7da70 100644 --- a/includes/normal/README +++ b/includes/normal/README @@ -32,6 +32,10 @@ have been changed or you remove it. data from from the net if necessary. If it reports failure, something is going wrong! +You may have to set up PHPUnit first. + +$ pear channel-discover pear.phpunit.de +$ pear install phpunit/PHPUnit == Benchmarks == -- 2.20.1