From bbc4e95775842a75526be3cee83e5bb76b30beb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 6 Feb 2010 15:57:51 +0000 Subject: [PATCH] Add a `make tap' target which runs the tests with `prove' and `phpunit --tap' Also rename files so that all *Test*.php files are real test cases and not just skeletons used for setup, those are now called *Setup*.php. --- maintenance/tests/Makefile | 6 ++++++ maintenance/tests/MediaWikiAPITest.php | 4 ++-- .../{MediaWikiAPI_TestCase.php => MediaWikiAPI_Setup.php} | 2 +- .../tests/{MediaWiki_TestCase.php => MediaWiki_Setup.php} | 2 +- maintenance/tests/SearchEngineTest.php | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) rename maintenance/tests/{MediaWikiAPI_TestCase.php => MediaWikiAPI_Setup.php} (94%) rename maintenance/tests/{MediaWiki_TestCase.php => MediaWiki_Setup.php} (95%) diff --git a/maintenance/tests/Makefile b/maintenance/tests/Makefile index 545a8b1962..5c8139485d 100644 --- a/maintenance/tests/Makefile +++ b/maintenance/tests/Makefile @@ -1,11 +1,17 @@ .PHONY: help test all test: phpunit + +tap: + prove -e 'phpunit --tap' *Test*.php + install: pear channel-discover pear.phpunit.de pear install phpunit/PHPUnit + help: # Options: # test (default) Run the unit tests + # tap Run the tests individually through Test::Harness's prove(1) # install Install PHPUnit from phpunit.de # help You're looking at it! diff --git a/maintenance/tests/MediaWikiAPITest.php b/maintenance/tests/MediaWikiAPITest.php index a08a9c97ae..045ec418ed 100644 --- a/maintenance/tests/MediaWikiAPITest.php +++ b/maintenance/tests/MediaWikiAPITest.php @@ -1,8 +1,8 @@