pronamic /
wp-money
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Bootstrap tests |
||
| 4 | * |
||
| 5 | * @author Pronamic <[email protected]> |
||
| 6 | * @copyright 2005-2019 Pronamic |
||
| 7 | * @license GPL-3.0-or-later |
||
| 8 | * @package Pronamic\WordPress\Money |
||
| 9 | */ |
||
| 10 | |||
| 11 | putenv( 'WP_PHPUNIT__TESTS_CONFIG=tests/wp-config.php' ); |
||
| 12 | |||
| 13 | require_once __DIR__ . '/../vendor/autoload.php'; |
||
| 14 | |||
| 15 | if ( is_readable( '.env' ) ) { |
||
| 16 | $dotenv = new Dotenv\Dotenv( __DIR__ ); |
||
| 17 | $dotenv->load(); |
||
| 18 | } |
||
| 19 | |||
| 20 | require_once getenv( 'WP_PHPUNIT__DIR' ) . '/includes/functions.php'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Manually load plugin. |
||
| 24 | */ |
||
| 25 | function _manually_load_plugin() { |
||
| 26 | require __DIR__ . '/../pronamic-money.php'; |
||
| 27 | } |
||
| 28 | |||
| 29 | tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 30 | |||
| 31 | // Bootstrap. |
||
| 32 | require getenv( 'WP_PHPUNIT__DIR' ) . '/includes/bootstrap.php'; |
||
| 33 |