@@ -58,6 +58,41 @@ public function testLintStringWithUnterminatedContext()
5858 ), $ this ->linter ->getErrors ());
5959 }
6060
61+ public function testLintStringWithWrongSelectorDoubleComma ()
62+ {
63+ $ this ->assertFalse ($ this ->linter ->lintString ('a,, {} ' ));
64+ $ this ->assertSame (array (
65+ 'Selector token "," cannot be preceded by "a," (line: 1, char: 3) '
66+ ), $ this ->linter ->getErrors ());
67+ }
68+
69+ public function testLintStringWithWrongSelectorDoubleHash ()
70+ {
71+ $ this ->assertFalse ($ this ->linter ->lintString ('## {} ' ));
72+ $ this ->assertSame (array (
73+ 'Selector token "#" cannot be preceded by "#" (line: 1, char: 2) '
74+ ), $ this ->linter ->getErrors ());
75+ }
76+
77+ public function testLintStringWithWrongPropertyNameUnexpectedToken ()
78+ {
79+ $ this ->assertFalse ($ this ->linter ->lintString ('.test {
80+ test~: true;
81+ } ' ));
82+ $ this ->assertSame (array (
83+ 'Unexpected property name token "~" (line: 2, char: 10) ' ,
84+ 'Unknown CSS property "test~" (line: 2, char: 11) '
85+ ), $ this ->linter ->getErrors ());
86+ }
87+
88+ public function testLintStringWithWrongSelectorUnexpectedToken ()
89+ {
90+ $ this ->assertFalse ($ this ->linter ->lintString ('.a| {} ' ));
91+ $ this ->assertSame (array (
92+ 'Unexpected selector token "|" (line: 1, char: 3) '
93+ ), $ this ->linter ->getErrors ());
94+ }
95+
6196 /**
6297 * @expectedException \InvalidArgumentException
6398 * @expectedExceptionMessage Argument "$sString" expects a string, "boolean" given
0 commit comments