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 @@ -130,4 +130,26 @@ public function caseInsensitivity()
130
130
$ oResult ->render ()
131
131
);
132
132
}
133
+
134
+ /**
135
+ * @expectedException \Sabberworm\CSS\Parsing\UnexpectedTokenException
136
+ *
137
+ * @test
138
+ */
139
+ public function invalidColor ()
140
+ {
141
+ $ sFile = __DIR__ . '/../fixtures/invalid-color.css ' ;
142
+ $ oParser = new Parser (file_get_contents ($ sFile ), Settings::create ()->beStrict ());
143
+ $ oParser ->parse ();
144
+ }
145
+
146
+ /**
147
+ * @test
148
+ */
149
+ public function invalidColor2 ()
150
+ {
151
+ $ sFile = __DIR__ . '/../fixtures/invalid-color.css ' ;
152
+ $ oParser = new Parser (file_get_contents ($ sFile ), Settings::create ()->withLenientParsing (true ));
153
+ $ oParser ->parse ();
154
+ }
133
155
}
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