@@ -41,42 +41,57 @@ protected function setUp()
4141 $ this ->oDocument = $ this ->oParser ->parse ();
4242 }
4343
44- public function testPlain ()
44+ /**
45+ * @test
46+ */
47+ public function plain ()
4548 {
46- $ this -> assertSame (
49+ self :: assertSame (
4750 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
4851@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
4952 $ this ->oDocument ->render ()
5053 );
5154 }
5255
53- public function testCompact ()
56+ /**
57+ * @test
58+ */
59+ public function compact ()
5460 {
55- $ this -> assertSame (
61+ self :: assertSame (
5662 '.main,.test{font:italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background:white;} '
5763 . '@media screen{.main{background-size:100% 100%;font-size:1.3em;background-color:#fff;}} ' ,
5864 $ this ->oDocument ->render (OutputFormat::createCompact ())
5965 );
6066 }
6167
62- public function testPretty ()
68+ /**
69+ * @test
70+ */
71+ public function pretty ()
6372 {
64- $ this -> assertSame (self ::TEST_CSS , $ this ->oDocument ->render (OutputFormat::createPretty ()));
73+ self :: assertSame (self ::TEST_CSS , $ this ->oDocument ->render (OutputFormat::createPretty ()));
6574 }
6675
67- public function testSpaceAfterListArgumentSeparator ()
76+ /**
77+ * @test
78+ */
79+ public function spaceAfterListArgumentSeparator ()
6880 {
69- $ this -> assertSame (
81+ self :: assertSame (
7082 '.main, .test {font: italic normal bold 16px/ 1.2 '
7183 . '"Helvetica", Verdana, sans-serif;background: white;} '
7284 . "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} " ,
7385 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator (" " ))
7486 );
7587 }
7688
77- public function testSpaceAfterListArgumentSeparatorComplex ()
89+ /**
90+ * @test
91+ */
92+ public function spaceAfterListArgumentSeparatorComplex ()
7893 {
79- $ this -> assertSame (
94+ self :: assertSame (
8095 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica", Verdana, sans-serif;background: white;} '
8196 . "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} " ,
8297 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator ([
@@ -88,55 +103,73 @@ public function testSpaceAfterListArgumentSeparatorComplex()
88103 );
89104 }
90105
91- public function testSpaceAfterSelectorSeparator ()
106+ /**
107+ * @test
108+ */
109+ public function spaceAfterSelectorSeparator ()
92110 {
93- $ this -> assertSame (
111+ self :: assertSame (
94112 '.main,
95113.test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
96114@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
97115 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterSelectorSeparator ("\n" ))
98116 );
99117 }
100118
101- public function testStringQuotingType ()
119+ /**
120+ * @test
121+ */
122+ public function stringQuotingType ()
102123 {
103- $ this -> assertSame (
124+ self :: assertSame (
104125 '.main, .test {font: italic normal bold 16px/1.2 \'Helvetica \',Verdana,sans-serif;background: white;}
105126@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
106127 $ this ->oDocument ->render (OutputFormat::create ()->setStringQuotingType ("' " ))
107128 );
108129 }
109130
110- public function testRGBHashNotation ()
131+ /**
132+ * @test
133+ */
134+ public function rGBHashNotation ()
111135 {
112- $ this -> assertSame (
136+ self :: assertSame (
113137 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
114138@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: rgb(255,255,255);}} ' ,
115139 $ this ->oDocument ->render (OutputFormat::create ()->setRGBHashNotation (false ))
116140 );
117141 }
118142
119- public function testSemicolonAfterLastRule ()
143+ /**
144+ * @test
145+ */
146+ public function semicolonAfterLastRule ()
120147 {
121- $ this -> assertSame (
148+ self :: assertSame (
122149 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white}
123150@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff}} ' ,
124151 $ this ->oDocument ->render (OutputFormat::create ()->setSemicolonAfterLastRule (false ))
125152 );
126153 }
127154
128- public function testSpaceAfterRuleName ()
155+ /**
156+ * @test
157+ */
158+ public function spaceAfterRuleName ()
129159 {
130- $ this -> assertSame (
160+ self :: assertSame (
131161 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
132162@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
133163 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterRuleName ("\t" ))
134164 );
135165 }
136166
137- public function testSpaceRules ()
167+ /**
168+ * @test
169+ */
170+ public function spaceRules ()
138171 {
139- $ this -> assertSame ('.main, .test {
172+ self :: assertSame ('.main, .test {
140173 font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;
141174 background: white;
142175}
@@ -147,19 +180,25 @@ public function testSpaceRules()
147180 }} ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )));
148181 }
149182
150- public function testSpaceBlocks ()
183+ /**
184+ * @test
185+ */
186+ public function spaceBlocks ()
151187 {
152- $ this -> assertSame ('
188+ self :: assertSame ('
153189.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
154190@media screen {
155191 .main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}
156192}
157193 ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Blocks ' , "\n" )));
158194 }
159195
160- public function testSpaceBoth ()
196+ /**
197+ * @test
198+ */
199+ public function spaceBoth ()
161200 {
162- $ this -> assertSame ('
201+ self :: assertSame ('
163202.main, .test {
164203 font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;
165204 background: white;
@@ -174,18 +213,24 @@ public function testSpaceBoth()
174213 ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )->set ('Space*Blocks ' , "\n" )));
175214 }
176215
177- public function testSpaceBetweenBlocks ()
216+ /**
217+ * @test
218+ */
219+ public function spaceBetweenBlocks ()
178220 {
179- $ this -> assertSame (
221+ self :: assertSame (
180222 '.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;} '
181223 . '@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
182224 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceBetweenBlocks ('' ))
183225 );
184226 }
185227
186- public function testIndentation ()
228+ /**
229+ * @test
230+ */
231+ public function indentation ()
187232 {
188- $ this -> assertSame ('
233+ self :: assertSame ('
189234.main, .test {
190235font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;
191236background: white;
@@ -203,9 +248,12 @@ public function testIndentation()
203248 ->setIndentation ('' )));
204249 }
205250
206- public function testSpaceBeforeBraces ()
251+ /**
252+ * @test
253+ */
254+ public function spaceBeforeBraces ()
207255 {
208- $ this -> assertSame (
256+ self :: assertSame (
209257 '.main, .test{font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
210258@media screen{.main{background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
211259 $ this ->oDocument ->render (OutputFormat::create ()->setSpaceBeforeOpeningBrace ('' ))
@@ -214,13 +262,15 @@ public function testSpaceBeforeBraces()
214262
215263 /**
216264 * @expectedException \Sabberworm\CSS\Parsing\OutputException
265+ *
266+ * @test
217267 */
218- public function testIgnoreExceptionsOff ()
268+ public function ignoreExceptionsOff ()
219269 {
220270 $ aBlocks = $ this ->oDocument ->getAllDeclarationBlocks ();
221271 $ oFirstBlock = $ aBlocks [0 ];
222272 $ oFirstBlock ->removeSelector ('.main ' );
223- $ this -> assertSame (
273+ self :: assertSame (
224274 '.test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
225275@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
226276 $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (false ))
@@ -229,13 +279,16 @@ public function testIgnoreExceptionsOff()
229279 $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (false ));
230280 }
231281
232- public function testIgnoreExceptionsOn ()
282+ /**
283+ * @test
284+ */
285+ public function ignoreExceptionsOn ()
233286 {
234287 $ aBlocks = $ this ->oDocument ->getAllDeclarationBlocks ();
235288 $ oFirstBlock = $ aBlocks [0 ];
236289 $ oFirstBlock ->removeSelector ('.main ' );
237290 $ oFirstBlock ->removeSelector ('.test ' );
238- $ this -> assertSame (
291+ self :: assertSame (
239292 '@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
240293 $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (true ))
241294 );
0 commit comments