Updates unit test

This commit is contained in:
Vlad
2017-09-11 11:40:14 -04:00
parent 2ac7d1d4ab
commit ba86cbfb18
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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();
} }