Replace expect()->isEmpty() with verify()->empty()

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

[MAILPOET-5664]
This commit is contained in:
Rodrigo Primo
2023-10-18 16:12:00 -03:00
committed by David Remer
parent 1865fc8930
commit e4136fee8c
37 changed files with 77 additions and 77 deletions

View File

@ -229,7 +229,7 @@ class FormsTest extends \MailPoetTest {
$response = $this->endpoint->restore(['id' => 'Invalid ID']);
verify($response->errors[0]['error'])->equals('not_found');
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
expect($response->meta)->isEmpty();
verify($response->meta)->empty();
}
public function testItCanTrashAForm() {
@ -246,12 +246,12 @@ class FormsTest extends \MailPoetTest {
$response = $this->endpoint->trash(['id' => 'Invalid ID']);
verify($response->errors[0]['error'])->equals('not_found');
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
expect($response->meta)->isEmpty();
verify($response->meta)->empty();
}
public function testItCanDeleteAForm() {
$response = $this->endpoint->delete(['id' => $this->form3->getId()]);
expect($response->data)->isEmpty();
verify($response->data)->empty();
verify($response->status)->equals(APIResponse::STATUS_OK);
verify($response->meta['count'])->equals(1);
}
@ -260,7 +260,7 @@ class FormsTest extends \MailPoetTest {
$response = $this->endpoint->delete(['id' => 'Invalid ID']);
verify($response->errors[0]['error'])->equals('not_found');
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
expect($response->meta)->isEmpty();
verify($response->meta)->empty();
}
public function testItCanDuplicateAForm() {