Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/ConvertKitAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ public function testCreateGetUpdateAndDeleteSequenceEmail()
preview_text: 'Test Preview Text',
content: 'Test Content',
email_template_id: (int) $_ENV['CONVERTKIT_API_EMAIL_TEMPLATE_ID'],
published: false,
published: true,
send_days: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'],
position: 0
);
Expand All @@ -1770,7 +1770,7 @@ public function testCreateGetUpdateAndDeleteSequenceEmail()
$this->assertEquals('Test Preview Text', $result['preview_text']);
$this->assertEquals('Test Content', $result['content']);
$this->assertEquals((int) $_ENV['CONVERTKIT_API_EMAIL_TEMPLATE_ID'], $result['email_template_id']);
$this->assertEquals(false, $result['published']);
$this->assertEquals(true, $result['published']);
$this->assertEquals(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'], $result['send_days']);
$this->assertEquals(2, $result['position']);

Expand Down Expand Up @@ -4329,23 +4329,23 @@ public function testCreateSubscriberWithInvalidSubscriberState()
}

/**
* Test that create_subscriber() throws a ClientException when an invalid
* custom field is included.
* Test that create_subscriber() returns the expected warnings
* when an invalid custom field is included.
*
* @since 2.0.0
*
* @return void
*/
public function testCreateSubscriberWithInvalidCustomFields()
{
$this->expectException(ClientException::class);
$emailAddress = $this->generateEmailAddress();
$result = $this->api->create_subscriber(
email_address: $emailAddress,
fields: [
'not_a_custom_field' => 'value'
]
);
$this->assertArrayHasKey('warnings', get_object_vars($result));
}

/**
Expand Down
Loading