@@ 71-74 (lines=4) @@ | ||
68 | $xpathObj->registerNamespace('shibmd', Scope::NS); |
|
69 | $nodeList = $xpathObj->query($xpath); |
|
70 | ||
71 | if (!$nodeList || $nodeList->length === 0) { |
|
72 | $message = sprintf('The xpath "%s" did not result in at least one match.', $xpath); |
|
73 | throw new ExpectationException($message, $this->getSession()); |
|
74 | } |
|
75 | } |
|
76 | ||
77 | /** |
|
@@ 90-97 (lines=8) @@ | ||
87 | $xpathObj->registerNamespace('mdui', Common::NS); |
|
88 | $nodeList = $xpathObj->query($xpath); |
|
89 | ||
90 | if ($nodeList && $nodeList->length > 0) { |
|
91 | $message = sprintf( |
|
92 | 'The xpath "%s" resulted in "%d" matches, where it should result in no matches"', |
|
93 | $xpath, |
|
94 | $nodeList->length |
|
95 | ); |
|
96 | throw new ExpectationException($message, $this->getSession()); |
|
97 | } |
|
98 | } |
|
99 | ||
100 | /** |