1 | <?php |
||
9 | class AttributeMatcher extends TagMatcher { |
||
10 | |||
11 | /** |
||
12 | * @var Matcher |
||
13 | */ |
||
14 | private $attributeNameMatcher; |
||
15 | |||
16 | /** |
||
17 | * @var Matcher|null |
||
18 | */ |
||
19 | private $valueMatcher; |
||
20 | |||
21 | /** |
||
22 | * @param Matcher|string $attributeName |
||
23 | * |
||
24 | * @return self |
||
25 | */ |
||
26 | public static function withAttribute( $attributeName ) { |
||
29 | |||
30 | /** |
||
31 | * @param Matcher $attributeNameMatcher |
||
32 | */ |
||
33 | public function __construct( Matcher $attributeNameMatcher ) { |
||
38 | |||
39 | /** |
||
40 | * @param Matcher|string $value |
||
41 | * |
||
42 | * @return AttributeMatcher |
||
43 | */ |
||
44 | public function havingValue( $value ) { |
||
51 | |||
52 | 2 | public function describeTo( Description $description ) { |
|
60 | |||
61 | /** |
||
62 | * @param \DOMElement $item |
||
63 | * @param Description $mismatchDescription |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | 6 | protected function matchesSafelyWithDiagnosticDescription( $item, Description $mismatchDescription ) { |
|
86 | |||
87 | } |
||
88 |