Build/Test Tools: Utilise assertWPError() and assertNotWPError() in more places.

See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39174 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2016-11-09 00:01:42 +00:00
parent 5ab2a22a38
commit 61fa0a69d6
10 changed files with 27 additions and 27 deletions

View File

@@ -29,7 +29,7 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML' ) as $p ) {
$parser = new $p;
$result = $parser->parse($file);
$this->assertTrue( is_wp_error( $result ) );
$this->assertWPError( $result );
$this->assertEquals( 'There was an error when reading this WXR file', $result->get_error_message() );
}
}
@@ -42,7 +42,7 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
foreach ( array( $f1, $f2 ) as $file ) {
$parser = new $p;
$result = $parser->parse( $file );
$this->assertTrue( is_wp_error( $result ) );
$this->assertWPError( $result );
$this->assertEquals( 'This does not appear to be a WXR file, missing/invalid WXR version number', $result->get_error_message() );
}
}