98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
|
name: ParserTest
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: TestCase
|
||
|
type: class
|
||
|
source: PHPUnit\Framework\TestCase
|
||
|
- name: SyntaxErrorException
|
||
|
type: class
|
||
|
source: Symfony\Component\CssSelector\Exception\SyntaxErrorException
|
||
|
- name: FunctionNode
|
||
|
type: class
|
||
|
source: Symfony\Component\CssSelector\Node\FunctionNode
|
||
|
- name: SelectorNode
|
||
|
type: class
|
||
|
source: Symfony\Component\CssSelector\Node\SelectorNode
|
||
|
- name: Parser
|
||
|
type: class
|
||
|
source: Symfony\Component\CssSelector\Parser\Parser
|
||
|
- name: Token
|
||
|
type: class
|
||
|
source: Symfony\Component\CssSelector\Parser\Token
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: testParser
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: source
|
||
|
- name: representation
|
||
|
comment: '# @dataProvider getParserTestData'
|
||
|
- name: testParserException
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: source
|
||
|
- name: message
|
||
|
comment: '# @dataProvider getParserExceptionTestData'
|
||
|
- name: testPseudoElements
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: source
|
||
|
- name: element
|
||
|
- name: pseudo
|
||
|
comment: '# @dataProvider getPseudoElementsTestData'
|
||
|
- name: testSpecificity
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: source
|
||
|
- name: value
|
||
|
comment: "# @var SelectorNode $selector */\n# $selector = $selectors[0];\n# $this->assertEquals($element,\
|
||
|
\ (string) $selector->getTree());\n# $this->assertEquals($pseudo, (string) $selector->getPseudoElement());\n\
|
||
|
# }\n# \n# /** @dataProvider getSpecificityTestData"
|
||
|
- name: testParseSeries
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: series
|
||
|
- name: a
|
||
|
- name: b
|
||
|
comment: "# @var SelectorNode $selector */\n# $selector = $selectors[0];\n# $this->assertEquals($value,\
|
||
|
\ $selector->getSpecificity()->getValue());\n# }\n# \n# /** @dataProvider getParseSeriesTestData"
|
||
|
- name: testParseSeriesException
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: series
|
||
|
comment: "# @var FunctionNode $function */\n# $function = $selectors[0]->getTree();\n\
|
||
|
# $this->assertEquals([$a, $b], Parser::parseSeries($function->getArguments()));\n\
|
||
|
# }\n# \n# /** @dataProvider getParseSeriesExceptionTestData"
|
||
|
- name: getParserTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: getParserExceptionTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: getPseudoElementsTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: getSpecificityTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: getParseSeriesTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: getParseSeriesExceptionTestData
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
traits:
|
||
|
- PHPUnit\Framework\TestCase
|
||
|
- Symfony\Component\CssSelector\Exception\SyntaxErrorException
|
||
|
- Symfony\Component\CssSelector\Node\FunctionNode
|
||
|
- Symfony\Component\CssSelector\Node\SelectorNode
|
||
|
- Symfony\Component\CssSelector\Parser\Parser
|
||
|
- Symfony\Component\CssSelector\Parser\Token
|
||
|
interfaces: []
|