Files
piratepoet/mailpoet/tests/unit/Newsletter/Renderer/Blocks/SpacerTest.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

36 lines
921 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Newsletter\Renderer\Blocks;
class SpacerTest extends \MailPoetUnitTest {
private $block = [
'type' => 'spacer',
'styles' => [
'block' => [
'backgroundColor' => 'transparent',
'height' => '13px',
],
],
];
public function testItRendersCorrectly() {
$output = (new Spacer)->render($this->block);
$expectedResult = '
<tr>
<td class="mailpoet_spacer" height="13" valign="top"></td>
</tr>';
verify($output)->equals($expectedResult);
}
public function testsItRendersWithBackground() {
$this->block['styles']['block']['backgroundColor'] = "#ffffff";
$output = (new Spacer)->render($this->block);
$expectedResult = '
<tr>
<td class="mailpoet_spacer" bgcolor="#ffffff" height="13" valign="top"></td>
</tr>';
verify($output)->equals($expectedResult);
}
}