|
|
|
|
@ -86,7 +86,7 @@ final class EntityViewBuilderTest extends AbstractTestCase {
|
|
|
|
|
self::assertCache($expected_cache, $build['#cache']); |
|
|
|
|
|
|
|
|
|
$expected_html = <<< 'HTML' |
|
|
|
|
<article role="article"> |
|
|
|
|
<article> |
|
|
|
|
<h2><a href="/node/1" rel="bookmark"><span>Public node</span></a></h2> |
|
|
|
|
<div></div> |
|
|
|
|
</article> |
|
|
|
|
@ -119,7 +119,7 @@ final class EntityViewBuilderTest extends AbstractTestCase {
|
|
|
|
|
self::assertCache($expected_cache, $build['#cache']); |
|
|
|
|
|
|
|
|
|
$expected_html = <<< 'HTML' |
|
|
|
|
<article role="article"> |
|
|
|
|
<article> |
|
|
|
|
<h2><a href="/node/1" rel="bookmark"><span>Public node</span></a></h2> |
|
|
|
|
<div> |
|
|
|
|
<ul class="links inline"> |
|
|
|
|
@ -174,7 +174,7 @@ final class EntityViewBuilderTest extends AbstractTestCase {
|
|
|
|
|
self::assertCache($expected_cache, $build['#cache']); |
|
|
|
|
|
|
|
|
|
$expected_html = <<< 'HTML' |
|
|
|
|
<article role="article"> |
|
|
|
|
<article> |
|
|
|
|
<h2><a href="/node/2" rel="bookmark"><span>Private node</span></a></h2> |
|
|
|
|
<div></div> |
|
|
|
|
</article> |
|
|
|
|
@ -196,7 +196,7 @@ final class EntityViewBuilderTest extends AbstractTestCase {
|
|
|
|
|
* Normalizes the provided HTML. |
|
|
|
|
*/ |
|
|
|
|
private static function normalizeHtml(string $html): string { |
|
|
|
|
return trim(preg_replace(['#\s{2,}#', '#\n#'], '', $html)); |
|
|
|
|
return rtrim(preg_replace(['#\s{2,}#', '#\n#'], '', $html)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|