File tree 2 files changed +42
-0
lines changed
2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ <phpunit
2
+ bootstrap =" tests/bootstrap.php"
3
+ backupGlobals =" false"
4
+ colors =" true"
5
+ convertErrorsToExceptions =" true"
6
+ convertNoticesToExceptions =" true"
7
+ convertWarningsToExceptions =" true"
8
+ >
9
+ <testsuites >
10
+ <testsuite >
11
+ <directory prefix =" test-" suffix =" .php" >./tests/</directory >
12
+ </testsuite >
13
+ </testsuites >
14
+ <filter >
15
+ <whitelist processUncoveredFilesFromWhitelist =" true" >
16
+ <directory suffix =" .php" >./</directory >
17
+ <exclude >
18
+ <directory suffix =" .php" >./tests/</directory >
19
+ <directory suffix =" .php" >./bin/</directory >
20
+ <file >./inc/cli.php</file >
21
+ </exclude >
22
+ </whitelist >
23
+ </filter >
24
+ </phpunit >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ $ _tests_dir = getenv ( 'WP_TESTS_DIR ' );
3
+
4
+ if ( ! $ _tests_dir ) {
5
+ $ _tests_dir = '/tmp/wordpress-tests-lib ' ;
6
+ }
7
+
8
+ require_once $ _tests_dir . '/includes/functions.php ' ;
9
+
10
+ function _manually_load_plugin () {
11
+ if ( ! defined ( 'HH_HUGO_UNIT_TESTS_RUNNING ' ) ) {
12
+ define ( 'HH_HUGO_UNIT_TESTS_RUNNING ' , true );
13
+ }
14
+ require dirname ( dirname ( __FILE__ ) ) . '/command.php ' ;
15
+ }
16
+ tests_add_filter ( 'muplugins_loaded ' , '_manually_load_plugin ' );
17
+
18
+ require $ _tests_dir . '/includes/bootstrap.php ' ;
You can’t perform that action at this time.
0 commit comments