mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 04:34:41 +00:00
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:
@@ -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() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user