Skip import tests if WordPress Importer plugin is missing.
props mattheu. fixes #27250. git-svn-id: https://develop.svn.wordpress.org/trunk@27349 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ac662c73b
commit
f213decc7e
@ -14,6 +14,11 @@ class Tests_Import_Import extends WP_Import_UnitTestCase {
|
||||
define( 'WP_LOAD_IMPORTERS', true );
|
||||
|
||||
add_filter( 'import_allow_create_users', '__return_true' );
|
||||
|
||||
if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) {
|
||||
$this->markTestSkipped( 'WordPress Importer plugin is not installed.' );
|
||||
}
|
||||
|
||||
require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php';
|
||||
|
||||
global $wpdb;
|
||||
|
@ -13,6 +13,10 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
if ( ! defined( 'WP_LOAD_IMPORTERS' ) )
|
||||
define( 'WP_LOAD_IMPORTERS', true );
|
||||
|
||||
if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) {
|
||||
$this->markTestSkipped( 'WordPress Importer plugin is not installed.' );
|
||||
}
|
||||
|
||||
require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php';
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,10 @@ class Tests_Import_Postmeta extends WP_Import_UnitTestCase {
|
||||
if ( ! defined( 'WP_LOAD_IMPORTERS' ) )
|
||||
define( 'WP_LOAD_IMPORTERS', true );
|
||||
|
||||
if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) {
|
||||
$this->markTestSkipped( 'WordPress Importer plugin is not installed.' );
|
||||
}
|
||||
|
||||
require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user