Replace expect()->hasKey() with verify()->arrayHasKey()

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

[MAILPOET-5664]
This commit is contained in:
Rodrigo Primo
2023-10-18 15:48:25 -03:00
committed by David Remer
parent eba025a345
commit a70067a34c
22 changed files with 88 additions and 88 deletions

View File

@@ -80,7 +80,7 @@ class ModelTest extends \MailPoetTest {
$model->set_orm($orm);
$model->save();
$errors = $model->getErrors();
expect($errors)->hasKey(MPModel::DUPLICATE_RECORD);
verify($errors)->arrayHasKey(MPModel::DUPLICATE_RECORD);
verify($errors[MPModel::DUPLICATE_RECORD])->stringContainsString('Please specify a different "name".');
}