diff --git a/src/lib/Behat/Component/Fields/ContentRelationMultiple.php b/src/lib/Behat/Component/Fields/ContentRelationMultiple.php index 5d9b5e7ba2..e928d83cd1 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 7a6b7ddf2a..30ad73dff8 100644 --- a/src/lib/Behat/Component/Fields/ContentRelationSingle.php +++ b/src/lib/Behat/Component/Fields/ContentRelationSingle.php @@ -87,7 +87,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'