Skip to content

Commit

Permalink
[WIP] sources without width
Browse files Browse the repository at this point in the history
  • Loading branch information
achimfritz committed Nov 19, 2024
1 parent 2622749 commit 5fe174b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Build/phpunit/FunctionalTests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
backupGlobals="true"
bootstrap="FunctionalTestsBootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:i="http://typo3.org/ns/B13/Picture/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<f:spaceless>

<i:image
src="EXT:picture/Resources/Public/Test/Picture.png"
sources="{0: {src: 'EXT:picture/Resources/Public/Icons/Extension.svg', variants: '1024'}}"
/>
</f:spaceless>
</html>
13 changes: 13 additions & 0 deletions Tests/Functional/Frontend/Fixtures/sources_without_width.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"pages"
,"uid","pid","title","slug"
,1,0,"root","/"
"sys_template"
,"uid","pid","root","constants","config"
,1,1,1,styles.content.image.lazyLoading=lazy,"@import 'EXT:picture/Configuration/TypoScript/test.typoscript'
page = PAGE
page.config.disableAllHeaderCode = 1
page.10 = FLUIDTEMPLATE
page.10.templateRootPaths.10 = EXT:picture/Tests/Functional/Frontend/Fixtures/Templates
page.10.templateName = SourcesWithoutWidth.html
config.absRefPrefix = /
"
9 changes: 9 additions & 0 deletions Tests/Functional/Frontend/TagRenderingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ public function svgAsSourceWithWebpDoNotAddWebp(): void
self::assertStringContainsString('Icons/Extension.svg" media="(min-width: 1024px)" />', $body);
}

/**
* @test
*/
public function sourcesWithoutWidth(): void
{
$this->importCSVDataSet(__DIR__ . '/Fixtures/sources_without_width.csv');
$this->executeFrontendSubRequest(new InternalRequest('http://localhost/'));
}

/**
* @test
*/
Expand Down

0 comments on commit 5fe174b

Please sign in to comment.