File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -131,4 +131,26 @@ public function caseInsensitivity()
131
131
$ oResult ->render ()
132
132
);
133
133
}
134
+
135
+ /**
136
+ * @test
137
+ */
138
+ public function invalidColor ()
139
+ {
140
+ $ sFile = __DIR__ . '/../fixtures/invalid-color.css ' ;
141
+ $ oParser = new Parser (file_get_contents ($ sFile ), Settings::create ()->withLenientParsing (true ));
142
+ $ oParser ->parse ();
143
+ }
144
+
145
+ /**
146
+ * @test
147
+ */
148
+ public function invalidColorStrict ()
149
+ {
150
+ $ this ->expectException (UnexpectedTokenException::class);
151
+
152
+ $ sFile = __DIR__ . '/../fixtures/invalid-color.css ' ;
153
+ $ oParser = new Parser (file_get_contents ($ sFile ), Settings::create ()->beStrict ());
154
+ $ oParser ->parse ();
155
+ }
134
156
}
Original file line number Diff line number Diff line change
1
+ # test {
2
+ color: # a;
3
+ background: # ab;
4
+ }
5
+
6
+ body
7
+ color : # abcd ;
8
+ background: # abcde ;
9
+ }
10
+
11
+ a { color : # fffff ;}
You can’t perform that action at this time.
0 commit comments