@@ -36,17 +36,17 @@ final class OutputFormatTest extends TestCase
36
36
/**
37
37
* @var Parser
38
38
*/
39
- private $ oParser ;
39
+ private $ parser ;
40
40
41
41
/**
42
42
* @var Document
43
43
*/
44
- private $ oDocument ;
44
+ private $ document ;
45
45
46
46
protected function setUp (): void
47
47
{
48
- $ this ->oParser = new Parser (self ::TEST_CSS );
49
- $ this ->oDocument = $ this ->oParser ->parse ();
48
+ $ this ->parser = new Parser (self ::TEST_CSS );
49
+ $ this ->document = $ this ->parser ->parse ();
50
50
}
51
51
52
52
/**
@@ -57,7 +57,7 @@ public function plain(): void
57
57
self ::assertSame (
58
58
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
59
59
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
60
- $ this ->oDocument ->render ()
60
+ $ this ->document ->render ()
61
61
);
62
62
}
63
63
@@ -69,7 +69,7 @@ public function compact(): void
69
69
self ::assertSame (
70
70
'.main,.test{font:italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background:white;} '
71
71
. '@media screen{.main{background-size:100% 100%;font-size:1.3em;background-color:#fff;}} ' ,
72
- $ this ->oDocument ->render (OutputFormat::createCompact ())
72
+ $ this ->document ->render (OutputFormat::createCompact ())
73
73
);
74
74
}
75
75
@@ -78,7 +78,7 @@ public function compact(): void
78
78
*/
79
79
public function pretty (): void
80
80
{
81
- self ::assertSame (self ::TEST_CSS , $ this ->oDocument ->render (OutputFormat::createPretty ()));
81
+ self ::assertSame (self ::TEST_CSS , $ this ->document ->render (OutputFormat::createPretty ()));
82
82
}
83
83
84
84
/**
@@ -90,7 +90,7 @@ public function spaceAfterListArgumentSeparator(): void
90
90
'.main, .test {font: italic normal bold 16px/ 1.2 '
91
91
. '"Helvetica", Verdana, sans-serif;background: white;} '
92
92
. "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} " ,
93
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator (' ' ))
93
+ $ this ->document ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator (' ' ))
94
94
);
95
95
}
96
96
@@ -102,7 +102,7 @@ public function spaceAfterListArgumentSeparatorComplex(): void
102
102
self ::assertSame (
103
103
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica", Verdana, sans-serif;background: white;} '
104
104
. "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} " ,
105
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator ([
105
+ $ this ->document ->render (OutputFormat::create ()->setSpaceAfterListArgumentSeparator ([
106
106
'default ' => ' ' ,
107
107
', ' => "\t" ,
108
108
'/ ' => '' ,
@@ -120,7 +120,7 @@ public function spaceAfterSelectorSeparator(): void
120
120
'.main,
121
121
.test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
122
122
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
123
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterSelectorSeparator ("\n" ))
123
+ $ this ->document ->render (OutputFormat::create ()->setSpaceAfterSelectorSeparator ("\n" ))
124
124
);
125
125
}
126
126
@@ -132,7 +132,7 @@ public function stringQuotingType(): void
132
132
self ::assertSame (
133
133
'.main, .test {font: italic normal bold 16px/1.2 \'Helvetica \',Verdana,sans-serif;background: white;}
134
134
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
135
- $ this ->oDocument ->render (OutputFormat::create ()->setStringQuotingType ("' " ))
135
+ $ this ->document ->render (OutputFormat::create ()->setStringQuotingType ("' " ))
136
136
);
137
137
}
138
138
@@ -144,7 +144,7 @@ public function rGBHashNotation(): void
144
144
self ::assertSame (
145
145
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
146
146
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: rgb(255,255,255);}} ' ,
147
- $ this ->oDocument ->render (OutputFormat::create ()->setRGBHashNotation (false ))
147
+ $ this ->document ->render (OutputFormat::create ()->setRGBHashNotation (false ))
148
148
);
149
149
}
150
150
@@ -156,7 +156,7 @@ public function semicolonAfterLastRule(): void
156
156
self ::assertSame (
157
157
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white}
158
158
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff}} ' ,
159
- $ this ->oDocument ->render (OutputFormat::create ()->setSemicolonAfterLastRule (false ))
159
+ $ this ->document ->render (OutputFormat::create ()->setSemicolonAfterLastRule (false ))
160
160
);
161
161
}
162
162
@@ -168,7 +168,7 @@ public function spaceAfterRuleName(): void
168
168
self ::assertSame (
169
169
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
170
170
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
171
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceAfterRuleName ("\t" ))
171
+ $ this ->document ->render (OutputFormat::create ()->setSpaceAfterRuleName ("\t" ))
172
172
);
173
173
}
174
174
@@ -185,7 +185,7 @@ public function spaceRules(): void
185
185
background-size: 100% 100%;
186
186
font-size: 1.3em;
187
187
background-color: #fff;
188
- }} ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )));
188
+ }} ' , $ this ->document ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )));
189
189
}
190
190
191
191
/**
@@ -198,7 +198,7 @@ public function spaceBlocks(): void
198
198
@media screen {
199
199
.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}
200
200
}
201
- ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Blocks ' , "\n" )));
201
+ ' , $ this ->document ->render (OutputFormat::create ()->set ('Space*Blocks ' , "\n" )));
202
202
}
203
203
204
204
/**
@@ -218,7 +218,7 @@ public function spaceBoth(): void
218
218
background-color: #fff;
219
219
}
220
220
}
221
- ' , $ this ->oDocument ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )->set ('Space*Blocks ' , "\n" )));
221
+ ' , $ this ->document ->render (OutputFormat::create ()->set ('Space*Rules ' , "\n" )->set ('Space*Blocks ' , "\n" )));
222
222
}
223
223
224
224
/**
@@ -229,7 +229,7 @@ public function spaceBetweenBlocks(): void
229
229
self ::assertSame (
230
230
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;} '
231
231
. '@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
232
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceBetweenBlocks ('' ))
232
+ $ this ->document ->render (OutputFormat::create ()->setSpaceBetweenBlocks ('' ))
233
233
);
234
234
}
235
235
@@ -250,7 +250,7 @@ public function indentation(): void
250
250
background-color: #fff;
251
251
}
252
252
}
253
- ' , $ this ->oDocument ->render (OutputFormat::create ()
253
+ ' , $ this ->document ->render (OutputFormat::create ()
254
254
->set ('Space*Rules ' , "\n" )
255
255
->set ('Space*Blocks ' , "\n" )
256
256
->setIndentation ('' )));
@@ -264,7 +264,7 @@ public function spaceBeforeBraces(): void
264
264
self ::assertSame (
265
265
'.main, .test{font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
266
266
@media screen{.main{background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
267
- $ this ->oDocument ->render (OutputFormat::create ()->setSpaceBeforeOpeningBrace ('' ))
267
+ $ this ->document ->render (OutputFormat::create ()->setSpaceBeforeOpeningBrace ('' ))
268
268
);
269
269
}
270
270
@@ -275,30 +275,30 @@ public function ignoreExceptionsOff(): void
275
275
{
276
276
$ this ->expectException (OutputException::class);
277
277
278
- $ aBlocks = $ this ->oDocument ->getAllDeclarationBlocks ();
279
- $ oFirstBlock = $ aBlocks [0 ];
280
- $ oFirstBlock ->removeSelector ('.main ' );
278
+ $ declarationBlocks = $ this ->document ->getAllDeclarationBlocks ();
279
+ $ firstDeclarationBlock = $ declarationBlocks [0 ];
280
+ $ firstDeclarationBlock ->removeSelector ('.main ' );
281
281
self ::assertSame (
282
282
'.test {font: italic normal bold 16px/1.2 "Helvetica",Verdana,sans-serif;background: white;}
283
283
@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
284
- $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (false ))
284
+ $ this ->document ->render (OutputFormat::create ()->setIgnoreExceptions (false ))
285
285
);
286
- $ oFirstBlock ->removeSelector ('.test ' );
287
- $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (false ));
286
+ $ firstDeclarationBlock ->removeSelector ('.test ' );
287
+ $ this ->document ->render (OutputFormat::create ()->setIgnoreExceptions (false ));
288
288
}
289
289
290
290
/**
291
291
* @test
292
292
*/
293
293
public function ignoreExceptionsOn (): void
294
294
{
295
- $ aBlocks = $ this ->oDocument ->getAllDeclarationBlocks ();
296
- $ oFirstBlock = $ aBlocks [0 ];
297
- $ oFirstBlock ->removeSelector ('.main ' );
298
- $ oFirstBlock ->removeSelector ('.test ' );
295
+ $ declarationBlocks = $ this ->document ->getAllDeclarationBlocks ();
296
+ $ firstDeclarationBlock = $ declarationBlocks [0 ];
297
+ $ firstDeclarationBlock ->removeSelector ('.main ' );
298
+ $ firstDeclarationBlock ->removeSelector ('.test ' );
299
299
self ::assertSame (
300
300
'@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}} ' ,
301
- $ this ->oDocument ->render (OutputFormat::create ()->setIgnoreExceptions (true ))
301
+ $ this ->document ->render (OutputFormat::create ()->setIgnoreExceptions (true ))
302
302
);
303
303
}
304
304
}
0 commit comments