Skip to content

Commit

Permalink
[TASK] Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsteeb committed Oct 10, 2024
1 parent 40d4075 commit 05bebd1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Tests/Functional/Frontend/TagRenderingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function simpleImageWithRetinaAndWebpOption(): void
$response = $this->executeFrontendSubRequest(new InternalRequest('http://localhost/'));
$body = (string)$response->getBody();
$expected = '<picture>
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_cfb567934c.webp, /typo3temp/assets/_processed_/a/2/csm_Picture_089357224d.webp 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_d356d2dde1.webp 3x" type="image/webp" />
<source type="image/webp" srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_cfb567934c.webp, /typo3temp/assets/_processed_/a/2/csm_Picture_089357224d.webp 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_d356d2dde1.webp 3x" type="image/webp" />
<img alt="Testimage 400px width with retina and addWebp option " src="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" width="400" height="200" loading="lazy" srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png, /typo3temp/assets/_processed_/a/2/csm_Picture_13dd378eeb.png 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_3c8b5cfedf.png 3x" />
</picture>';
$expected = implode('', GeneralUtility::trimExplode("\n", $expected));
Expand All @@ -119,7 +119,7 @@ public function imageWithMultipleSizes(): void
$body = (string)$response->getBody();
$expected = ' <picture>
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_30b88604ff.png" media="(min-width: 1024px)" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" type="image/png" />
<img alt="Testimage with 400px image size, 800px image size for screens &gt; 1024px" src="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" width="400" height="200" loading="lazy" />
</picture> ';
$expected = implode('', GeneralUtility::trimExplode("\n", $expected));
Expand All @@ -136,7 +136,7 @@ public function imageWithTwoSizesAndRetinaOption(): void
$body = (string)$response->getBody();
$expected = '<picture>
<source media="(min-width: 1024px)" srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_30b88604ff.png, /typo3temp/assets/_processed_/a/2/csm_Picture_9939a0a20d.png 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_367bb79630.png 3x" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png, /typo3temp/assets/_processed_/a/2/csm_Picture_13dd378eeb.png 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_3c8b5cfedf.png 3x" />
<source type="image/png" srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png, /typo3temp/assets/_processed_/a/2/csm_Picture_13dd378eeb.png 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_3c8b5cfedf.png 3x" />
<img alt="Testimage with 400px image size, 800px image size for screens &gt; 1024px, with retina" src="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" width="400" height="200" loading="lazy" srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png, /typo3temp/assets/_processed_/a/2/csm_Picture_13dd378eeb.png 2x, /typo3temp/assets/_processed_/a/2/csm_Picture_3c8b5cfedf.png 3x" />
</picture>';
$expected = implode('', GeneralUtility::trimExplode("\n", $expected));
Expand All @@ -152,7 +152,7 @@ public function singleImageWithMultipleImageSizesAndTwoBreakpoints(): void
$response = $this->executeFrontendSubRequest(new InternalRequest('http://localhost/'));
$body = (string)$response->getBody();
$expected = '<picture>
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_724dd3b269.png 310w, /typo3temp/assets/_processed_/a/2/csm_Picture_6cab563075.png 345w, /typo3temp/assets/_processed_/a/2/csm_Picture_703de20dda.png 400w" sizes="100vh" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_724dd3b269.png 310w, /typo3temp/assets/_processed_/a/2/csm_Picture_6cab563075.png 345w, /typo3temp/assets/_processed_/a/2/csm_Picture_703de20dda.png 400w" sizes="100vh" type="image/png" />
<img alt="Testimage with 400px image size, with multiple images as a srcset, including webp image format with fallback" src="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" width="400" height="200" loading="lazy" />
</picture>';
$expected = implode('', GeneralUtility::trimExplode("\n", $expected));
Expand Down Expand Up @@ -187,9 +187,9 @@ public function imageWithSrcsetAndASizesValueWithWebpOption(): void
$body = (string)$response->getBody();
$expected = '<picture class="myPictureClass">
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_80498eb4cf.webp 800w, /typo3temp/assets/_processed_/a/2/csm_Picture_6546fe1853.webp 1200w, /typo3temp/assets/_processed_/a/2/csm_Picture_fffe3df9da.webp 1600w, /typo3temp/assets/_processed_/a/2/csm_Picture_0a9265a906.webp 2000w" media="(min-width: 1024px)" sizes="100vh" type="image/webp" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_39487edcc6.png 800w, /typo3temp/assets/_processed_/a/2/csm_Picture_86fac4fe8a.png 1200w, /typo3temp/assets/_processed_/a/2/csm_Picture_a1c0b8cf78.png 1600w, /typo3temp/assets/_processed_/a/2/csm_Picture_fc98b213ea.png 2000w" media="(min-width: 1024px)" sizes="100vh" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_39487edcc6.png 800w, /typo3temp/assets/_processed_/a/2/csm_Picture_86fac4fe8a.png 1200w, /typo3temp/assets/_processed_/a/2/csm_Picture_a1c0b8cf78.png 1600w, /typo3temp/assets/_processed_/a/2/csm_Picture_fc98b213ea.png 2000w" media="(min-width: 1024px)" sizes="100vh" type="image/png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_79ce5f6e5c.webp 310w, /typo3temp/assets/_processed_/a/2/csm_Picture_955087c064.webp 345w, /typo3temp/assets/_processed_/a/2/csm_Picture_881ba9c90f.webp 400w" sizes="100vh" type="image/webp" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_724dd3b269.png 310w, /typo3temp/assets/_processed_/a/2/csm_Picture_6cab563075.png 345w, /typo3temp/assets/_processed_/a/2/csm_Picture_703de20dda.png 400w" sizes="100vh" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_724dd3b269.png 310w, /typo3temp/assets/_processed_/a/2/csm_Picture_6cab563075.png 345w, /typo3temp/assets/_processed_/a/2/csm_Picture_703de20dda.png 400w" sizes="100vh" type="image/png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_cfb567934c.webp" type="image/webp" />
<img alt="Testimage with 400px image size, 800px image size for screens &gt; 1024px, with multiple images as a srcset, including webp image format with fallback" src="/typo3temp/assets/_processed_/a/2/csm_Picture_23f7889ff5.png" width="400" height="200" loading="lazy" />
</picture>';
Expand Down Expand Up @@ -251,9 +251,9 @@ public function imageWithMultipleSourcesWithWebPOption(): void
$body = (string)$response->getBody();
$expected = '<picture class="myPictureClass">
<source srcset="/typo3temp/assets/_processed_/a/1/csm_Picture_alt_4b5b9dd7fe.webp" media="(min-width: 1024px)" type="image/webp" />
<source srcset="/typo3temp/assets/_processed_/a/1/csm_Picture_alt_b2b773d76f.png" media="(min-width: 1024px)" />
<source srcset="/typo3temp/assets/_processed_/a/1/csm_Picture_alt_b2b773d76f.png" media="(min-width: 1024px)" type="image/png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_21770d9a15.webp" type="image/webp" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_0d0101f0a6.png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_0d0101f0a6.png" type="image/png" />
<source srcset="/typo3temp/assets/_processed_/a/2/csm_Picture_21770d9a15.webp" type="image/webp" />
<img alt="Testimage with 400px image size, 800px image size with rotated image for screens &gt; 1024px, with webP option" src="/typo3temp/assets/_processed_/a/2/csm_Picture_0d0101f0a6.png" width="400" height="200" loading="lazy" />
</picture>';
Expand Down

0 comments on commit 05bebd1

Please sign in to comment.