':scope > foo bar > div',
['CombinedSelector[CombinedSelector[CombinedSelector[Pseudo[Element[*]:scope] > Element[foo]] <followed> Element[bar]] > Element[div]]'
]],
[':scope > #foo #bar',
['CombinedSelector[CombinedSelector[Pseudo[Element[*]:scope] > Hash[Element[*]#foo]] <followed> Hash[Element[*]#bar]]'
]],
[':scope',
['Pseudo[Element[*]:scope]'
]],
['foo bar, :scope > div',
['CombinedSelector[Element[foo] <followed> Element[bar]]', 'CombinedSelector[Pseudo[Element[*]:scope] > Element[div]]'
]],
['foo bar,:scope > div',
['CombinedSelector[Element[foo] <followed> Element[bar]]', 'CombinedSelector[Pseudo[Element[*]:scope] > Element[div]]'
]],
];
} public static function getParserExceptionTestData() { return [ ['attributes(href)/html/body/a', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, '(', 10
))->
getMessage()],
['attributes(href)', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, '(', 10
))->
getMessage()],
['html/body/a', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, '/', 4
))->
getMessage()],
[' ', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_FILE_END, '', 1
))->
getMessage()],
['div, ', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_FILE_END, '', 5
))->
getMessage()],
[' , div', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, ',', 1
))->
getMessage()],
['p, , div', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, ',', 3
))->
getMessage()],
['div > ', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_FILE_END, '', 6
))->
getMessage()],
[' > div', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, '>', 2
))->
getMessage()],
['foo|#bar', SyntaxErrorException::
unexpectedToken('identifier or "*"',
new Token(Token::TYPE_HASH, 'bar', 4
))->
getMessage()],
['#.foo', SyntaxErrorException::
unexpectedToken('selector',
new Token(Token::TYPE_DELIMITER, '#', 0
))->
getMessage()],
['.#foo', SyntaxErrorException::
unexpectedToken('identifier',
new Token(Token::TYPE_HASH, 'foo', 1
))->
getMessage()],
[