Skip to content

Commit

Permalink
WebDriverNotConstraint can receive non-string selecters on 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Naktibalda committed Feb 26, 2019
1 parent 5f2742b commit d0da25a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Constraint/WebDriverNot.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ protected function matches($nodes)

protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null)
{
if (!is_string($selector) || strpos($selector, "'") === false) {
$selector = Locator::humanReadableString($selector);
}
if (!$this->string) {
throw new \PHPUnit\Framework\ExpectationFailedException(
"Element $selector was found",
Expand Down

0 comments on commit d0da25a

Please sign in to comment.