http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74009
Revision: 74009
Author: mah
Date: 2010-09-30 01:00:16 +0000 (Thu, 30 Sep 2010)
Log Message:
-----------
* Update Makefile with recommended SHELL variable
* Use $(shell pwd) so that if the makefile is executed with ?\226?\128?\152-C
path',
it will find the suite.xml
* Update ExtraParserTest with a sane-for-testing default for
$wgShowDBErrorBacktrace
* Set $wgContLang if for some reasaon, it is null.
Modified Paths:
--------------
trunk/phase3/maintenance/tests/phpunit/Makefile
trunk/phase3/maintenance/tests/phpunit/includes/ExtraParserTest.php
Modified: trunk/phase3/maintenance/tests/phpunit/Makefile
===================================================================
--- trunk/phase3/maintenance/tests/phpunit/Makefile 2010-09-30 00:50:49 UTC
(rev 74008)
+++ trunk/phase3/maintenance/tests/phpunit/Makefile 2010-09-30 01:00:16 UTC
(rev 74009)
@@ -1,6 +1,7 @@
.PHONY: help test phpunit install coverage
-CONFIG_FILE = suite.xml
+SHELL = /bin/sh
+CONFIG_FILE = $(shell pwd)/suite.xml
FLAGS =
PU = phpunit --configuration ${CONFIG_FILE}
Modified: trunk/phase3/maintenance/tests/phpunit/includes/ExtraParserTest.php
===================================================================
--- trunk/phase3/maintenance/tests/phpunit/includes/ExtraParserTest.php
2010-09-30 00:50:49 UTC (rev 74008)
+++ trunk/phase3/maintenance/tests/phpunit/includes/ExtraParserTest.php
2010-09-30 01:00:16 UTC (rev 74009)
@@ -2,12 +2,16 @@
/**
* Parser-related tests that don't suit for parserTests.txt
*/
-
+
class ExtraParserTest extends PHPUnit_Framework_TestCase {
function setUp() {
global $wgMemc;
+ global $wgContLang;
+ global $wgShowDBErrorBacktrace;
+ $wgShowDBErrorBacktrace = true;
+ if ( $wgContLang === null ) $wgContLang = new Language;
$wgMemc = new FakeMemCachedClient;
}
@@ -24,7 +28,7 @@
$parser = new Parser();
$t = Title::newFromText( 'Unit test' );
$options = new ParserOptions();
- $this->assertEquals( "<p>$longLine</p>",
+ $this->assertEquals( "<p>$longLine</p>",
$parser->parse( $longLine, $t, $options )->getText() );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs