Skip to content

Commit

Permalink
Fixed WebDriverNot constrait tests
Browse files Browse the repository at this point in the history
selector can only be string with PHPUnit 8
  • Loading branch information
Naktibalda committed Feb 25, 2019
1 parent bc52102 commit da6f487
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Constraint/WebDriverNot.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ protected function matches($nodes) : bool

protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null) : void
{
$selectorString = Locator::humanReadableString($selector);
if (!$this->string) {
throw new \PHPUnit\Framework\ExpectationFailedException(
"Element $selectorString was found",
"Element $selector was found",
$comparisonFailure
);
}

$output = "There was $selectorString element";
$output = "There was $selector element";
$output .= $this->uriMessage("on page");
$output .= $this->nodesList($nodes, $this->string);
$output .= "\ncontaining '{$this->string}'";
Expand Down

0 comments on commit da6f487

Please sign in to comment.