Skip to content

Commit 7f4fd30

Browse files
Build/Test Tools: Only require the WordPress Importer plugin when running core tests.
This allows other users of the WordPress unit test suite framework to run their own unit tests without needing the WordPress Importer plugin, which should only be a requirement if running core tests. Follow-up to [59085]. Props bjorsch. Fixes #62106. git-svn-id: https://develop.svn.wordpress.org/trunk@59086 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 60a66de commit 7f4fd30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/phpunit/includes/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
define( 'DIR_TESTROOT', realpath( dirname( __DIR__ ) ) );
217217
define( 'IMPORTER_PLUGIN_FOR_TESTS', DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' );
218218

219-
if ( ! file_exists( IMPORTER_PLUGIN_FOR_TESTS ) ) {
219+
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! file_exists( IMPORTER_PLUGIN_FOR_TESTS ) ) {
220220
echo 'The test suite requires the WordPress Importer plugin to be available in the `/data/plugins/` directory.'
221221
. ' See: https://make.wordpress.org/core/handbook/contribute/git/#unit-tests' . PHP_EOL,
222222
exit( 1 );

0 commit comments

Comments
 (0)