@@ -146,6 +146,12 @@ public static function getParserTestData()
146
146
// unicode escape: \20 == (space)
147
147
['*[aval=" \'\20 \'"] ' , ['Attribute[Element[*][aval = \'\' \'\']] ' ]],
148
148
["*[aval= \"' \\20 \r\n ' \"] " , ['Attribute[Element[*][aval = \'\' \'\']] ' ]],
149
+ [':scope > foo ' , ['CombinedSelector[Pseudo[Element[*]:scope] > Element[foo]] ' ]],
150
+ [':scope > foo bar > div ' , ['CombinedSelector[CombinedSelector[CombinedSelector[Pseudo[Element[*]:scope] > Element[foo]] <followed> Element[bar]] > Element[div]] ' ]],
151
+ [':scope > #foo #bar ' , ['CombinedSelector[CombinedSelector[Pseudo[Element[*]:scope] > Hash[Element[*]#foo]] <followed> Hash[Element[*]#bar]] ' ]],
152
+ [':scope ' , ['Pseudo[Element[*]:scope] ' ]],
153
+ ['foo bar, :scope > div ' , ['CombinedSelector[Element[foo] <followed> Element[bar]] ' , 'CombinedSelector[Pseudo[Element[*]:scope] > Element[div]] ' ]],
154
+ ['foo bar,:scope > div ' , ['CombinedSelector[Element[foo] <followed> Element[bar]] ' , 'CombinedSelector[Pseudo[Element[*]:scope] > Element[div]] ' ]],
149
155
];
150
156
}
151
157
@@ -176,6 +182,7 @@ public static function getParserExceptionTestData()
176
182
[':lang(fr ' , SyntaxErrorException::unexpectedToken ('an argument ' , new Token (Token::TYPE_FILE_END , '' , 8 ))->getMessage ()],
177
183
[':contains("foo ' , SyntaxErrorException::unclosedString (10 )->getMessage ()],
178
184
['foo! ' , SyntaxErrorException::unexpectedToken ('selector ' , new Token (Token::TYPE_DELIMITER , '! ' , 3 ))->getMessage ()],
185
+ [':scope > div :scope header ' , SyntaxErrorException::notAtTheStartOfASelector ('scope ' )->getMessage ()],
179
186
];
180
187
}
181
188
0 commit comments