Updates unit test
This commit is contained in:
@@ -217,8 +217,8 @@ class Initializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function postInitialize() {
|
function postInitialize() {
|
||||||
try {
|
|
||||||
if(!defined(self::INITIALIZED)) return;
|
if(!defined(self::INITIALIZED)) return;
|
||||||
|
try {
|
||||||
$this->setupHooks();
|
$this->setupHooks();
|
||||||
$this->setupJSONAPI();
|
$this->setupJSONAPI();
|
||||||
$this->setupRouter();
|
$this->setupRouter();
|
||||||
|
@@ -7,7 +7,7 @@ class InitializerTest extends \MailPoetTest {
|
|||||||
$is_hooked = false;
|
$is_hooked = false;
|
||||||
// mailpoet should hook to 'wp_loaded' with priority of 10
|
// mailpoet should hook to 'wp_loaded' with priority of 10
|
||||||
foreach($wp_filter['wp_loaded'][10] as $name => $hook) {
|
foreach($wp_filter['wp_loaded'][10] as $name => $hook) {
|
||||||
if(preg_match('/setupHooks/', $name)) $is_hooked = true;
|
if(preg_match('/postInitialize/', $name)) $is_hooked = true;
|
||||||
}
|
}
|
||||||
expect($is_hooked)->true();
|
expect($is_hooked)->true();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user