.PHONY: help test
all test:
- php run-test.php ArticleTest.php
- php run-test.php GlobalTest.php
- php run-test.php DatabaseTest.php
- php run-test.php ImageFunctionsTest.php
- php run-test.php SearchMySQL4Test.php
+ phpunit
install:
- cvs -z9 -d:pserver:cvsread:@cvs.php.net:/repository/ co -P pear/PHPUnit
- mv pear/PHPUnit .
- rm -rf pear
-clean:
- rm -rf PHPUnit pear
+ pear channel-discover pear.phpunit.de
+ pear install phpunit/PHPUnit
help:
# Options:
# test (default) Run the unit tests
- # install Install PHPUnit from CVS
- # clean Remove local PHPUnit install
+ # install Install PHPUnit from phpunit.de
# help You're looking at it!
Some quickie unit tests done with the PHPUnit testing framework. To run the
-test suite, run 'make test' in this dir.
+test suite, run 'make test' in this dir. This directly invokes 'phpunit.'
PHPUnit is no longer maintained by PEAR. To get the current version of
PHPUnit, first uninstall any old version of PHPUnit or PHPUnit2 from PEAR,
# pear channel-discover pear.phpunit.de
# pear install phpunit/PHPUnit
+
+You also may wish to install this via your normal package mechanism:
+
+# aptitude install phpunit
+ - or -
+# yum install phpunit
+
+Notes:
+- Label currently broken tests in the group Broken and they will not
+ be run by phpunit. You can add them to the group by putting the
+ following comment at the top of the file:
+ /**
+ * @group Broken
+ */
+- Need to fix some broken tests
+++ /dev/null
-This file describes an alternative way of testing from that in README
-since the README method didn't work for me.
-
- - Put a LocalSettings.php in the parent directory. If you checked
- out mediawiki/trunk/phase3 as a directory called mediawiki, then
- this is where your LocalSettings.php file would go.
- - Install PHPUnit. I used version 3.3.16 from Ubuntu.
- ("aptitude install phpunit").
- - Invoke phpunit directly instead of using make. This uses the
- phpunit.xml file to run the tests.
- - Fix broken tests.
- - Label currently broken tests in the group Broken and they will not
- be run by phpunit. You can add them to the group by putting the
- following comment at the top of the file:
-
- /**
- * @group Broken
- */
-
-
-
-NOTE: I haven't yet determined why but my PHP installation would
-sometimes segfault while linting the files. PHPUnit uses "php -l" to
-check file syntax and this is where the segfaults were happening.
+++ /dev/null
-<?php
-
-require_once( dirname(__FILE__) . '/../maintenance/commandLine.inc' );
-require( 'PHPUnit/TextUI/Command.php' );