r79431 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79430‎ | r79431 | r79432 >
Date:17:05, 1 January 2011
Author:soxred93
Status:resolved (Comments)
Tags:
Comment:
Don't use the --verbose option anymore
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/ParserHelpers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/ParserHelpers.php
@@ -2,19 +2,16 @@
33
44 class PHPUnitParserTest extends ParserTest {
55 function showTesting( $desc ) {
6 - if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showTesting( $desc );
76 /* Do nothing since we don't want to show info during PHPUnit testing. */
87 }
98
109 public function showSuccess( $desc ) {
1110 PHPUnit_Framework_Assert::assertTrue( true, $desc );
12 - if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showSuccess( $desc );
1311 return true;
1412 }
1513
1614 public function showFailure( $desc, $expected, $got ) {
1715 PHPUnit_Framework_Assert::assertEquals( $expected, $got, $desc );
18 - if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showFailure( $desc, $expected, $got );
1916 return false;
2017 }
2118
Index: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
@@ -302,9 +302,12 @@
303303
304304 foreach ( $iter as $t ) {
305305
306 - $result = $this->doRunTest( $t['test'], $t['input'], $t['result'], $t['options'], $t['config'] );
307 -
308 - //$this->recorder->record( $t['test'], $result );
 306+ try {
 307+ $result = $this->doRunTest( $t['test'], $t['input'], $t['result'], $t['options'], $t['config'] );
 308+ } catch( Exception $e ) {
 309+ $this->assertTrue( false, $t['test'] . ' (failed: ' . $e->getMessage() . ')' );
 310+ }
 311+
309312 }
310313
311314 }

Comments

#Comment by Reedy (talk | contribs)   06:49, 7 January 2011

Tesla fixed.

Unit tests failing


NewParserTest::testParserTests
Bad images - basic functionality (failed: Bad images - basic functionality
Failed asserting that <text> is equal to <string:>.
Bad images - basic functionality)
Failed asserting that <boolean:false> is true.

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:454
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:48
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:39

#Comment by Hashar (talk | contribs)   17:54, 6 March 2011

Marking 'fixme' per Reedy comment. Might already have been fixed though.

Status & tagging log