r86794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86793‎ | r86794 | r86795 >
Date:21:21, 23 April 2011
Author:mah
Status:ok
Tags:
Comment:
Use assertStringEqualsFile in place of assertEquals and reading the file.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php
@@ -129,9 +129,7 @@
130130
131131 $expectedFilename = "$folder/$filename.expected";
132132 if ( file_exists( $expectedFilename ) ) {
133 - $expectedXml = file_get_contents( $expectedFilename );
134 -
135 - $this->assertEquals( $expectedXml, $output );
 133+ $this->assertStringEqualsFile( $expectedFilename, $output );
136134 } else {
137135 $tempFilename = tempnam( $folder, "$filename." );
138136 file_put_contents( $tempFilename, $output );

Status & tagging log