Files
piratepoet/tests/unit/_bootstrap.php
marco 8e0217674f Env class to hold all environment variables.
We are going to use this class to store all variables
that we would store with globals and defines.
It will be initialized in the initializer and we'll be
able to get any variable with static methods.
2015-07-29 16:23:50 +02:00

13 lines
346 B
PHP

<?php
$wordpress_path = getenv('WP_TEST_PATH');
if($wordpress_path) {
if(file_exists($wordpress_path.'/wp-load.php')) {
require_once(getenv('WP_TEST_PATH').'/wp-load.php');
}
} else {
throw new Exception("You need to specify the path to your WordPress installation\n`WP_TEST_PATH` in your .env file");
}
\MailPoet\Config\Env::init();