From 897e799e48497c8fecc5d3142b32684a02c8aee5 Mon Sep 17 00:00:00 2001 From: Oleksandr Mykhailenko Date: Sat, 8 Apr 2023 19:43:42 +0300 Subject: [PATCH] Fixed error with expected bool value (#856) --- src/Api/MailingList/Member.php | 2 +- tests/Api/MailingList/MemberTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/MailingList/Member.php b/src/Api/MailingList/Member.php index eb99ae08..a3d3b1fc 100644 --- a/src/Api/MailingList/Member.php +++ b/src/Api/MailingList/Member.php @@ -160,7 +160,7 @@ public function createMultiple(string $list, array $members, $upsert = false) break; case 'subscribed': - Assert::oneOf($value, ['yes', 'no']); + Assert::oneOf($value, ['yes', 'no', true, false]); break; } diff --git a/tests/Api/MailingList/MemberTest.php b/tests/Api/MailingList/MemberTest.php index 8086ebdb..892b3e94 100644 --- a/tests/Api/MailingList/MemberTest.php +++ b/tests/Api/MailingList/MemberTest.php @@ -140,7 +140,7 @@ public function testCreateMultipleInvalidMemberArgument() [ 'address' => 'billy@example.com', 'name' => 'Billy', - 'subscribed' => true, + 'subscribed' => 123, ], ];