foreach ( $iter as $t ) {
- $result = $this->doRunTest( $t['test'], $t['input'], $t['result'], $t['options'], $t['config'] );
-
- //$this->recorder->record( $t['test'], $result );
+ try {
+ $result = $this->doRunTest( $t['test'], $t['input'], $t['result'], $t['options'], $t['config'] );
+ } catch( Exception $e ) {
+ $this->assertTrue( false, $t['test'] . ' (failed: ' . $e->getMessage() . ')' );
+ }
+
}
}
class PHPUnitParserTest extends ParserTest {
function showTesting( $desc ) {
- if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showTesting( $desc );
/* Do nothing since we don't want to show info during PHPUnit testing. */
}
public function showSuccess( $desc ) {
PHPUnit_Framework_Assert::assertTrue( true, $desc );
- if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showSuccess( $desc );
return true;
}
public function showFailure( $desc, $expected, $got ) {
PHPUnit_Framework_Assert::assertEquals( $expected, $got, $desc );
- if( MediaWikiPHPUnitCommand::$additionalArgs['verbose'] ) parent::showFailure( $desc, $expected, $got );
return false;
}