From: Mark A. Hershberger Date: Tue, 5 Jan 2010 04:34:44 +0000 (+0000) Subject: Make phpunit on Ubuntu work out-of-the-box (at least for me) and prepare for some... X-Git-Tag: 1.31.0-rc.0~38417 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=5ad6ea7d48320acdceb76783f563cbd186534e76;p=lhc%2Fweb%2Fwiklou.git Make phpunit on Ubuntu work out-of-the-box (at least for me) and prepare for some LanguageConverter.php tests. --- diff --git a/tests/LocalFileTest.php b/tests/LocalFileTest.php index 335b8bbe13..4b6fde46df 100644 --- a/tests/LocalFileTest.php +++ b/tests/LocalFileTest.php @@ -2,6 +2,7 @@ /** * These tests should work regardless of $wgCapitalLinks + * @group Broken */ class LocalFileTest extends PHPUnit_Framework_TestCase { diff --git a/tests/README.ALTERNATIVE b/tests/README.ALTERNATIVE new file mode 100644 index 0000000000..364d5e34b2 --- /dev/null +++ b/tests/README.ALTERNATIVE @@ -0,0 +1,24 @@ +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 would go in your + - 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. diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 4fc4b2fa9a..8193496b19 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -2,7 +2,10 @@ require_once 'MediaWiki_TestCase.php'; -/** @todo document */ +/** @todo document + * @group Broken + */ + class SearchEngineTest extends MediaWiki_TestCase { var $db, $search; diff --git a/tests/SearchMySQL4Test.php b/tests/SearchMySQL4Test.php index 4fe4d5440c..ffb41bfd77 100644 --- a/tests/SearchMySQL4Test.php +++ b/tests/SearchMySQL4Test.php @@ -1,6 +1,10 @@ + + + . + + + + Broken + + + \ No newline at end of file