codeception/verify 2.1 removed support for expect()->true() so we need to replace it with verify()->true(). [MAILPOET-5664]
16 lines
592 B
PHP
16 lines
592 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace MailPoet\Test\Config;
|
|
|
|
class InitializerTest extends \MailPoetTest {
|
|
public function testItConfiguresHooks() {
|
|
global $wp_filter; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
|
$isHooked = false;
|
|
// mailpoet should hook to 'wp_loaded' with priority of 10
|
|
foreach ($wp_filter['wp_loaded'][10] as $name => $hook) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
|
if (preg_match('/postInitialize/', $name)) $isHooked = true;
|
|
}
|
|
verify($isHooked)->true();
|
|
}
|
|
}
|