From: Mark A. Hershberger Date: Sat, 23 Apr 2011 21:21:02 +0000 (+0000) Subject: Use assertStringEqualsFile in place of assertEquals and reading the file. X-Git-Tag: 1.31.0-rc.0~30591 X-Git-Url: https://git.heureux-cyclage.org/index.php?a=commitdiff_plain;h=7d90f1683413b513a9532133e1a057f07a7ec302;p=lhc%2Fweb%2Fwiklou.git Use assertStringEqualsFile in place of assertEquals and reading the file. --- diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php index 7fdb14c302..39063326f6 100644 --- a/tests/phpunit/includes/parser/PreprocessorTest.php +++ b/tests/phpunit/includes/parser/PreprocessorTest.php @@ -129,9 +129,7 @@ class PreprocessorTest extends MediaWikiTestCase { $expectedFilename = "$folder/$filename.expected"; if ( file_exists( $expectedFilename ) ) { - $expectedXml = file_get_contents( $expectedFilename ); - - $this->assertEquals( $expectedXml, $output ); + $this->assertStringEqualsFile( $expectedFilename, $output ); } else { $tempFilename = tempnam( $folder, "$filename." ); file_put_contents( $tempFilename, $output );