From 3a3c0043cac99cef1c4fbdea98bfee4aa8b779c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 6 Feb 2023 14:32:48 +0100 Subject: [PATCH] [Behat] Changed assertions removed in PHPUnit 10 --- src/lib/Behat/Component/Fields/ContentRelationMultiple.php | 4 ++-- src/lib/Behat/Component/Fields/ContentRelationSingle.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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'