Commit Graph

17 Commits

Author SHA1 Message Date
Rodrigo Primo
9b56fdc688 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]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
5bc5b5ebd2 Replace expect()->notEmpty() with verify()->notEmpty()
codeception/verify 2.1 removed support for expect()->notEmpty() so we need
to replace it with verify()->notEmpty().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
eba025a345 Replace expect()->stringNotContainsString() with verify()->stringNotContainsString()
codeception/verify 2.1 removed support for expect()->stringNotContainsString() so we need
to replace it with verify()->stringNotContainsString().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
0d2f6e0776 Replace expect()->stringContainsString() with verify()->stringContainsString()
codeception/verify 2.1 removed support for expect()->stringContainsString() so we need
to replace it with verify()->stringContainsString().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
9adbf81a78 Replace expect()->true() with verify()->true()
codeception/verify 2.1 removed support for expect()->true() so we need
to replace it with verify()->true().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
afe378ba22 Replace expect()->equals() with verify()->equals()
codeception/verify 2.1 removed support for expect()->equals() so we need
to replace it with verify()->equals().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
4209b0dd15 Fix testItDisplaysAnUncheckedCheckboxIfCurrentUserIsSubscribed() test
Two different PRs changed the behavior of the checkbox that is tested in
the failing test: https://github.com/mailpoet/mailpoet/pull/4921 and
https://github.com/mailpoet/mailpoet/pull/4924.

The first PR changed the behavior of the checkbox and thus updated the
testItDisplaysAnUncheckedCheckboxIfCurrentUserIsSubscribed(). This test
class was mocking the method Helper::woocommerceFormField() and that is
why the affected test expected the rendered optin checkbox field to be
empty.

But https://github.com/mailpoet/mailpoet/pull/4924 changed how the
checkbox is generated, stopped using woocommerceFormField() and removed
the mock
(https://github.com/mailpoet/mailpoet/pull/4924/files#diff-6b8e70b6fb9886a41b8ca1040c4e455184f6d2436458d4579b5f8e5eeb9e666fL52).
That is what made the test start failing. Now that the mock is
not used anymore, we should check for the actual string instead of
empty.

[MAILPOET-5368]
2023-06-01 11:51:13 -03:00
Rodrigo Primo
b2de15add7 Update tests now that woocommerce_form_field() is not used anymore
[MAILPOET-4133]
2023-06-01 11:38:54 +02:00
Rodrigo Primo
3d88960745 Update automated tests to reflect change in the optin checkbox behavior
[MAILPOET-4178]
2023-05-30 13:25:24 +02:00
Jan Jakes
c1babe49db Remove more no longer necessary test cleanups
MAILPOET-5145
2023-04-07 12:11:12 -05:00
John Oleksowicz
cd0b795ac8 Extract customer creation/cleanup
This also ensures that cleanup always runs after all integration tests

MAILPOET-5145
2023-04-07 12:11:12 -05:00
John Oleksowicz
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
Rodrigo Primo
fa1f88c86a Use getServiceWithOverrides() to instantiated tested class
Doing this instead of calling the constructor of the class directly to
avoid having to update the test class whenever there is a change to the
constructor of the tested class.

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
Rostislav Wolny
ed5bd8de61 Add Woo dependent tests to woo group
Mark all integration tests that are related to WooCommerce with group "woo".
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00