Merge pull request woocommerce/woocommerce-admin#4 from woocommerce/add/phpunit
PHPUnit: Update setup to ensure Gutenberg is loaded
This commit is contained in:
commit
549af77be8
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
bootstrap="tests/bootstrap.php"
|
||||
backupGlobals="false"
|
||||
|
@ -6,9 +6,11 @@
|
|||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
verbose="true"
|
||||
syntaxCheck="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite>
|
||||
<testsuite name="Woo Dash Test Suite">
|
||||
<directory prefix="test-" suffix=".php">./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
|
|
@ -23,6 +23,7 @@ require_once $_tests_dir . '/includes/functions.php';
|
|||
* Manually load the plugin being tested.
|
||||
*/
|
||||
function _manually_load_plugin() {
|
||||
require dirname( dirname( dirname( __FILE__ ) ) ) . '/gutenberg/gutenberg.php';
|
||||
require dirname( dirname( __FILE__ ) ) . '/woo-dash.php';
|
||||
}
|
||||
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
||||
|
|
Loading…
Reference in New Issue