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\AttributeNode; |
||
15 | use Symfony\Component\CssSelector\Node\ElementNode; |
||
16 | |||
17 | class AttributeNodeTest extends AbstractNodeTest |
||
18 | { |
||
19 | public function getToStringConversionTestData() |
||
20 | { |
||
21 | return array( |
||
22 | array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'), |
||
23 | array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"), |
||
24 | array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"), |
||
25 | ); |
||
26 | } |
||
27 | |||
28 | public function getSpecificityValueTestData() |
||
29 | { |
||
30 | return array( |
||
31 | array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10), |
||
32 | array(new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11), |
||
33 | array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10), |
||
34 | array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10), |
||
35 | ); |
||
36 | } |
||
37 | } |