use constants for subscriptions

This commit is contained in:
2025-01-03 09:33:08 +01:00
parent 395d6c3b2e
commit cc3814bbcd
3 changed files with 35 additions and 25 deletions

View File

@ -93,21 +93,21 @@ class SubscriptionProcessTest extends IntegrationTestCase
public static function getDataProvider(): Generator
{
yield 'success' => [new Response(200, [], '{
"listid": "470370",
"name": "name 1",
"pendingurl": "",
"thankyouurl": "",
"usesingleoptin": false,
"resendconfirmationemail": false,
"usechangeemail": false
"'.SubscriptionProcess::LISTID.'": "470370",
"'.SubscriptionProcess::NAME.'": "name 1",
"'.SubscriptionProcess::PENDINGURL.'": "",
"'.SubscriptionProcess::THANKYOUURL.'": "",
"'.SubscriptionProcess::USE_SINGLE_OPTIN.'": false,
"'.SubscriptionProcess::RESEND_CONFIRMATION_EMAIL.'": false,
"'.SubscriptionProcess::USE_CHANGE_EMAIL.'": false
}'), new Subscription([
"listid" => "470370",
"name" => "name 1",
"pendingurl" => "",
"thankyouurl" => "",
"usesingleoptin" => false,
"resendconfirmationemail" => false,
"usechangeemail" => false,
SubscriptionProcess::LISTID => "470370",
SubscriptionProcess::NAME => "name 1",
SubscriptionProcess::PENDINGURL => "",
SubscriptionProcess::THANKYOUURL => "",
SubscriptionProcess::USE_SINGLE_OPTIN => false,
SubscriptionProcess::RESEND_CONFIRMATION_EMAIL => false,
SubscriptionProcess::USE_CHANGE_EMAIL => false,
])];
yield 'unknown id' => [new Response(404, [], '["Kein Opt-In-Prozess mit dieser ID."]'), null, true];
yield 'access denied' => [new Response(403, [], '["API Zugriff verweigert"]'), null, true];