Skip to content

Commit 4e9905c

Browse files
committed
Add failing tests on parser
1 parent e12a962 commit 4e9905c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ public static function getParserExceptionTestData()
177177
[':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()],
178178
[':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()],
179179
['foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()],
180+
[':has(a , b)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 7))->getMessage()],
181+
[':has()', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 0))->getMessage()],
180182
];
181183
}
182184

@@ -222,6 +224,10 @@ public static function getSpecificityTestData()
222224
[':not([foo])', 10],
223225
[':not(:empty)', 10],
224226
[':not(#foo)', 100],
227+
[':has(*)', 0],
228+
[':has(foo)', 1],
229+
[':has(.foo)', 10],
230+
[':has(> foo)', 1],
225231
['foo:empty', 11],
226232
['foo:before', 2],
227233
['foo::before', 2],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy