Skip to content

Commit

Permalink
add and improve tests + small adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vo committed Jun 28, 2022
1 parent c92dff6 commit 3318df5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ protected function getDefaultInsertTagParser(): InsertTagParser
);

$insertTagParser = $this->createMock(InsertTagParser::class);

$replaceDemo = static fn (string $input): string => str_replace(
['{{demo}}', '{{br}}'],
['demo', '<br>'],
$input
);

$insertTagParser
->method('replace')
->willReturnCallback($replaceDemo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testOutputsUnorderedList(): void
new ListController(),
[
'type' => 'list',
'listitems' => serialize(['foo', 'bar']),
'listitems' => serialize(['foo', 'bar{{br}}baz <i>plain</i>']),
'listtype' => 'unordered',
'cssID' => serialize(['', 'my-class']),
],
Expand All @@ -58,7 +58,7 @@ public function testOutputsUnorderedList(): void
<div class="my-class content_element/list">
<ul>
<li>foo</li>
<li>bar</li>
<li>bar<br>baz &lt;i&gt;plain&lt;/i&gt;</li>
</ul>
</div>
HTML;
Expand Down

0 comments on commit 3318df5

Please sign in to comment.