Skip to content

Commit b037f74

Browse files
committed
Add succeeding test
1 parent df83fd5 commit b037f74

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/Integration/View/ViewComponentTest.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -703,14 +703,6 @@ public function test_renders_minified_html_with_void_elements(): void
703703
HTML, $html);
704704
}
705705

706-
private function assertSnippetsMatch(string $expected, string $actual): void
707-
{
708-
$expected = str_replace([PHP_EOL, ' '], '', $expected);
709-
$actual = str_replace([PHP_EOL, ' '], '', $actual);
710-
711-
$this->assertSame($expected, $actual);
712-
}
713-
714706
public function test_multiple_instances_of_custom_component_using_slots(): void
715707
{
716708
$this->registerViewComponent('x-foo-bar', 'FOO-BAR');
@@ -729,9 +721,19 @@ public function test_multiple_instances_of_custom_component_using_slots(): void
729721
</x-slot>
730722
</x-test>
731723
HTML);
732-
ld($html);
733-
$this->assertStringEqualsStringIgnoringLineEndings(<<<'HTML'
734724

725+
$this->assertSnippetsMatch(<<<'HTML'
726+
<div>FOO-BAR
727+
FOO-BAR
728+
</div>
735729
HTML, $html);
736730
}
731+
732+
private function assertSnippetsMatch(string $expected, string $actual): void
733+
{
734+
$expected = str_replace([PHP_EOL, ' '], '', $expected);
735+
$actual = str_replace([PHP_EOL, ' '], '', $actual);
736+
737+
$this->assertSame($expected, $actual);
738+
}
737739
}

0 commit comments

Comments
 (0)