Replace expect()->regExp() with verify()->stringMatchesRegExp()

codeception/verify 2.1 removed support for expect()->regExp() so we need
to replace it with verify()->stringMatchesRegExp().

[MAILPOET-5664]
This commit is contained in:
Rodrigo Primo
2023-10-19 18:19:05 -03:00
committed by David Remer
parent 2ced2b4afa
commit 8bc4d78c68
9 changed files with 28 additions and 28 deletions

View File

@@ -106,7 +106,7 @@ class FormTest extends \MailPoetTest {
$formController = new Form(ContainerWrapper::getInstance()->get(API::class), $urlHelper);
$result = $formController->onSubmit($this->requestData);
verify($this->subscribersRepository->findOneBy(['email' => $this->testEmail]))->notEmpty();
expect($result)->regExp('/http.*?sample-post|http.*?\?p=\d+/i');
verify($result)->stringMatchesRegExp('/http.*?sample-post|http.*?\?p=\d+/i');
}
public function testItDoesNotSubscribeAndRedirectsBackWithErrorResponse() {