@@ 63-66 (lines=4) @@ | ||
60 | $xpathObj->registerNamespace('shibmd', Scope::NS); |
|
61 | $nodeList = $xpathObj->query($xpath); |
|
62 | ||
63 | if (!$nodeList || $nodeList->length === 0) { |
|
64 | $message = sprintf('The xpath "%s" did not result in at least one match.', $xpath); |
|
65 | throw new ExpectationException($message, $this->getSession()); |
|
66 | } |
|
67 | } |
|
68 | ||
69 | /** |
|
@@ 82-89 (lines=8) @@ | ||
79 | $xpathObj->registerNamespace('mdui', Common::NS); |
|
80 | $nodeList = $xpathObj->query($xpath); |
|
81 | ||
82 | if ($nodeList && $nodeList->length > 0) { |
|
83 | $message = sprintf( |
|
84 | 'The xpath "%s" resulted in "%d" matches, where it should result in no matches"', |
|
85 | $xpath, |
|
86 | $nodeList->length |
|
87 | ); |
|
88 | throw new ExpectationException($message, $this->getSession()); |
|
89 | } |
|
90 | } |
|
91 | ||
92 | /** |