diff --git a/src/lib/Behat/Component/Fields/ContentRelationMultiple.php b/src/lib/Behat/Component/Fields/ContentRelationMultiple.php index ea1f57a95c..a94520d28e 100644 --- a/src/lib/Behat/Component/Fields/ContentRelationMultiple.php +++ b/src/lib/Behat/Component/Fields/ContentRelationMultiple.php @@ -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' diff --git a/src/lib/Behat/Component/Fields/ContentRelationSingle.php b/src/lib/Behat/Component/Fields/ContentRelationSingle.php index caf90d30da..a164228700 100644 --- a/src/lib/Behat/Component/Fields/ContentRelationSingle.php +++ b/src/lib/Behat/Component/Fields/ContentRelationSingle.php @@ -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'