11<?php
2+
23declare (strict_types=1 );
34
45namespace Shel \CriticalCSS \Tests \Functional ;
89 */
910
1011use Neos \Fusion \Tests \Functional \FusionObjects \AbstractFusionObjectTest ;
11- use Neos \Fusion \View \FusionView ;
1212
1313/**
1414 * Testcase for the styles object
1515 */
1616class StylesTest extends AbstractFusionObjectTest
1717{
18- /**
19- * @inheritDoc
20- */
21- protected function buildView (): FusionView
22- {
23- $ view = parent ::buildView ();
24- $ view ->setPackageKey ('Shel.CriticalCSS ' );
25- $ view ->setFusionPathPattern (__DIR__ . '/Fixtures/Fusion ' );
26- return $ view ;
27- }
2818
2919 /**
3020 * @test
@@ -38,7 +28,8 @@ public function basicRenderingWorks()
3828 '<style data-inline> ' .
3929 '.style--1d5b3fc659{color:green;font-size:12px} ' .
4030 '</style> ' .
41- '<div class="style--1d5b3fc659">foo</div> ' , $ view ->render ()
31+ '<div class="style--1d5b3fc659">foo</div> ' ,
32+ $ view ->render ()
4233 );
4334 }
4435
@@ -70,7 +61,8 @@ public function eelExpressionRenderingWorks()
7061 '<style data-inline> ' .
7162 '.style--a01f4ebd21{font-size:7px} ' .
7263 '</style> ' .
73- '<div class="style--a01f4ebd21">foo</div> ' , $ view ->render ()
64+ '<div class="style--a01f4ebd21">foo</div> ' ,
65+ $ view ->render ()
7466 );
7567 }
7668
@@ -87,7 +79,8 @@ public function nestedRenderingWorks()
8779 '.style--0e1e7d5620{color:blue} ' .
8880 '.style--0e1e7d5620 strong{font-weight:bold} ' .
8981 '</style> ' .
90- '<div class="style--0e1e7d5620">foo <strong>bar</strong></div> ' , $ view ->render ()
82+ '<div class="style--0e1e7d5620">foo <strong>bar</strong></div> ' ,
83+ $ view ->render ()
9184 );
9285 }
9386
@@ -105,7 +98,8 @@ public function nestedRenderingWithoutDataStructuresWorks()
10598 '.style--e2384db9d9 strong{font-weight:bold} ' .
10699 '.style--e2384db9d9 strong em{color:pink} ' .
107100 '</style> ' .
108- '<div class="style--e2384db9d9">foo <strong>bar <em>pony</em></strong></div> ' , $ view ->render ()
101+ '<div class="style--e2384db9d9">foo <strong>bar <em>pony</em></strong></div> ' ,
102+ $ view ->render ()
109103 );
110104 }
111105
@@ -123,7 +117,8 @@ public function nestedEvaluationRenderingWorks()
123117 '.style--385286f4a7 strong{font-weight:bold} ' .
124118 '.style--385286f4a7 strong em{margin-top:50px} ' .
125119 '</style> ' .
126- '<div class="style--385286f4a7">foo <strong>bar <em>pony</em></strong></div> ' , $ view ->render ()
120+ '<div class="style--385286f4a7">foo <strong>bar <em>pony</em></strong></div> ' ,
121+ $ view ->render ()
127122 );
128123 }
129124
@@ -139,7 +134,8 @@ public function selectorRenderingWorks()
139134 '<style data-inline> ' .
140135 'body{font-family:Comic Sans} ' .
141136 '</style> ' .
142- '<html><body>foo</body></html> ' , $ view ->render ()
137+ '<html><body>foo</body></html> ' ,
138+ $ view ->render ()
143139 );
144140 }
145141
@@ -156,7 +152,8 @@ public function mediaQueryRenderingWorks()
156152 '.style--3e741db00a{color:blue} ' .
157153 '@media all{.style--3e741db00a{color:green}} ' .
158154 '</style> ' .
159- '<div class="style--3e741db00a">foo</div> ' , $ view ->render ()
155+ '<div class="style--3e741db00a">foo</div> ' ,
156+ $ view ->render ()
160157 );
161158 }
162159
@@ -174,7 +171,8 @@ public function mediaQueryWithNestingRenderingWorks()
174171 '@media all{.style--751ebabd93{color:green}} ' .
175172 '@media all{.style--751ebabd93 strong{color:yellow}} ' .
176173 '</style> ' .
177- '<div class="style--751ebabd93">foo <strong>bar</strong></div> ' , $ view ->render ()
174+ '<div class="style--751ebabd93">foo <strong>bar</strong></div> ' ,
175+ $ view ->render ()
178176 );
179177 }
180178
@@ -195,7 +193,8 @@ public function nestedMediaQueriesRenderingWorks()
195193 '.style--2d1e5ab0be strong{display:block} ' .
196194 '}} ' .
197195 '</style> ' .
198- '<div class="style--2d1e5ab0be">foo <strong>bar</strong></div> ' , $ view ->render ()
196+ '<div class="style--2d1e5ab0be">foo <strong>bar</strong></div> ' ,
197+ $ view ->render ()
199198 );
200199 }
201200
@@ -217,7 +216,8 @@ public function supportsQueryRenderingWorks()
217216 'display:flex ' .
218217 '}} ' .
219218 '</style> ' .
220- '<div class="style--c07e794268">foo</div> ' , $ view ->render ()
219+ '<div class="style--c07e794268">foo</div> ' ,
220+ $ view ->render ()
221221 );
222222 }
223223}
0 commit comments