Replace expect()->count() with verify()->arrayCount()

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

[MAILPOET-5664]
This commit is contained in:
Rodrigo Primo
2023-10-18 16:24:00 -03:00
committed by David Remer
parent e4136fee8c
commit 9b56fdc688
92 changed files with 376 additions and 376 deletions

View File

@ -29,7 +29,7 @@ class DynamicSegmentsResponseBuilderTest extends \MailPoetTest {
verify($response)->arrayHasKey('deleted_at');
verify($response['filters_connect'])->equals(DynamicSegmentFilterData::CONNECT_TYPE_AND);
expect($response['filters'])->array();
expect($response['filters'])->count(1);
verify($response['filters'])->arrayCount(1);
verify($response['filters'][0]['segmentType'])->equals(DynamicSegmentFilterData::TYPE_USER_ROLE);
verify($response['filters'][0]['wordpressRole'])->equals(['editor']);
verify($response['filters'][0]['action'])->equals(UserRole::TYPE);
@ -56,7 +56,7 @@ class DynamicSegmentsResponseBuilderTest extends \MailPoetTest {
verify($response)->arrayHasKey('deleted_at');
verify($response['filters_connect'])->equals(DynamicSegmentFilterData::CONNECT_TYPE_AND);
expect($response['filters'])->array();
expect($response['filters'])->count(2);
verify($response['filters'])->arrayCount(2);
verify($response['filters'][0]['segmentType'])->equals(DynamicSegmentFilterData::TYPE_USER_ROLE);
verify($response['filters'][0]['wordpressRole'])->equals(['editor']);
verify($response['filters'][0]['action'])->equals(UserRole::TYPE);