Files
piratepoet/mailpoet/tests/integration/Config/InitializerTest.php
Rodrigo Primo 9adbf81a78 Replace expect()->true() with verify()->true()
codeception/verify 2.1 removed support for expect()->true() so we need
to replace it with verify()->true().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00

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