Files
piratepoet/mailpoet/tests/integration/Form/Block/BlockRendererHelperTest.php
Rodrigo Primo afe378ba22 Replace expect()->equals() with verify()->equals()
codeception/verify 2.1 removed support for expect()->equals() so we need
to replace it with verify()->equals().

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

17 lines
712 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Form\Block;
/**
* There is also a unit test for this class in mailpoet/tests/unit/Form/Block/BlockRendererHelperTest.php
* The integration test method that need WordPress to be loaded.
*/
class BlockRendererHelperTest extends \MailPoetTest {
public function testItEscapesKnownShortCodes() {
$text = '[mailpoet_subscribers_count] [gallery attr="attr"]inside[/gallery][unknown]';
$rendererHelper = $this->diContainer->get(BlockRendererHelper::class);
$escaped = $rendererHelper->escapeShortCodes($text);
verify($escaped)->equals('&#91;mailpoet_subscribers_count&#93; &#91;gallery attr="attr"&#93;inside&#91;/gallery&#93;[unknown]');
}
}