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
|
<phpunit
|
||||||
bootstrap="tests/bootstrap.php"
|
bootstrap="tests/bootstrap.php"
|
||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
|
@ -6,9 +6,11 @@
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
|
verbose="true"
|
||||||
|
syntaxCheck="true"
|
||||||
>
|
>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite>
|
<testsuite name="Woo Dash Test Suite">
|
||||||
<directory prefix="test-" suffix=".php">./tests/</directory>
|
<directory prefix="test-" suffix=".php">./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
|
@ -23,6 +23,7 @@ require_once $_tests_dir . '/includes/functions.php';
|
||||||
* Manually load the plugin being tested.
|
* Manually load the plugin being tested.
|
||||||
*/
|
*/
|
||||||
function _manually_load_plugin() {
|
function _manually_load_plugin() {
|
||||||
|
require dirname( dirname( dirname( __FILE__ ) ) ) . '/gutenberg/gutenberg.php';
|
||||||
require dirname( dirname( __FILE__ ) ) . '/woo-dash.php';
|
require dirname( dirname( __FILE__ ) ) . '/woo-dash.php';
|
||||||
}
|
}
|
||||||
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
||||||
|
|
Loading…
Reference in New Issue