18 lines
491 B
PHP
18 lines
491 B
PHP
<?php
|
|
use \MailPoet\Config\Env;
|
|
|
|
$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");
|
|
}
|
|
|
|
Env::init();
|
|
\ORM::configure(Env::$db_source_name);
|
|
\ORM::configure('username', Env::$db_username);
|
|
\ORM::configure('password', Env::$db_password);
|