adjust CleanUpTest to run with PHPUnit 3
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 02:15:19 +0000 (02:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 02:15:19 +0000 (02:15 +0000)
includes/normal/CleanUpTest.php
includes/normal/README

index 30ec6a9..b7c9727 100644 (file)
@@ -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 );
index f8207a1..a17aa7d 100644 (file)
@@ -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 ==