Skip to content

Commit

Permalink
Tests: Revert [44509].
Browse files Browse the repository at this point in the history
This commit causes Travis to fail.

See #45863.


git-svn-id: https://develop.svn.wordpress.org/trunk@44512 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
pento committed Jan 9, 2019
1 parent a5594e7 commit 916695b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/phpunit/includes/bootstrap.php
Expand Up @@ -36,6 +36,12 @@
require_once $config_file_path;
require_once dirname( __FILE__ ) . '/functions.php';

if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && file_exists( ABSPATH . '_index.php' ) ) {
// Perhaps add more documentation about having to run `grunt` before running tests after changing code.
echo "ERROR: ABSPATH must point to the `build` directory, not the `src` directory. Please update your wp-tests-config.php file.\n";
exit( 1 );
}

tests_reset__SERVER();

define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
Expand Down
6 changes: 5 additions & 1 deletion wp-tests-config-sample.php
@@ -1,7 +1,11 @@
<?php

/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/build/' );
} else {
define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
}

/*
* Path to the theme to test with.
Expand Down

0 comments on commit 916695b

Please sign in to comment.