scratch – Blame information for rev 87
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
87 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of the Symfony package. |
||
5 | * |
||
6 | * (c) Fabien Potencier <fabien@symfony.com> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Symfony\Component\CssSelector\Tests\Node; |
||
13 | |||
14 | use Symfony\Component\CssSelector\Node\ElementNode; |
||
15 | use Symfony\Component\CssSelector\Node\FunctionNode; |
||
16 | use Symfony\Component\CssSelector\Parser\Token; |
||
17 | |||
18 | class FunctionNodeTest extends AbstractNodeTest |
||
19 | { |
||
20 | public function getToStringConversionTestData() |
||
21 | { |
||
22 | return array( |
||
23 | array(new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'), |
||
24 | array(new FunctionNode(new ElementNode(), 'function', array( |
||
25 | new Token(Token::TYPE_IDENTIFIER, 'value', 0), |
||
26 | )), "Function[Element[*]:function(['value'])]"), |
||
27 | array(new FunctionNode(new ElementNode(), 'function', array( |
||
28 | new Token(Token::TYPE_STRING, 'value1', 0), |
||
29 | new Token(Token::TYPE_NUMBER, 'value2', 0), |
||
30 | )), "Function[Element[*]:function(['value1', 'value2'])]"), |
||
31 | ); |
||
32 | } |
||
33 | |||
34 | public function getSpecificityValueTestData() |
||
35 | { |
||
36 | return array( |
||
37 | array(new FunctionNode(new ElementNode(), 'function'), 10), |
||
38 | array(new FunctionNode(new ElementNode(), 'function', array( |
||
39 | new Token(Token::TYPE_IDENTIFIER, 'value', 0), |
||
40 | )), 10), |
||
41 | array(new FunctionNode(new ElementNode(), 'function', array( |
||
42 | new Token(Token::TYPE_STRING, 'value1', 0), |
||
43 | new Token(Token::TYPE_NUMBER, 'value2', 0), |
||
44 | )), 10), |
||
45 | ); |
||
46 | } |
||
47 | } |