Skip to content

Commit

Permalink
[Behat] Changed assertions removed in PHPUnit 10 (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored Feb 6, 2023
1 parent 84c69df commit d2c9072
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/Behat/Component/Fields/ContentRelationMultiple.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ public function verifyValueInItemView(array $values): void
$secondValue = $explodedValue[count($explodedValue) - 1];

$viewPatternRegex = '/Multiple relations:[\w\/,: ]* %s [\w \/,:]*/';
Assert::assertRegExp(
Assert::assertMatchesRegularExpression(
sprintf($viewPatternRegex, $firstValue),
$this->getHTMLPage()->find($this->parentLocator)->getText(),
'Field has wrong value'
);
Assert::assertRegExp(
Assert::assertMatchesRegularExpression(
sprintf($viewPatternRegex, $secondValue),
$this->getHTMLPage()->find($this->parentLocator)->getText(),
'Field has wrong value'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Component/Fields/ContentRelationSingle.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function verifyValueInItemView(array $values): void

$viewPatternRegex = '/Single relation:[\w\/,: ]* %s [\w \/,:]*/';

Assert::assertRegExp(
Assert::assertMatchesRegularExpression(
sprintf($viewPatternRegex, $value),
$this->getHTMLPage()->find($this->parentLocator)->getText(),
'Field has wrong value'
Expand Down

0 comments on commit d2c9072

Please # to comment.