Skip to content

Commit dbc8f60

Browse files
committed
Started tests
1 parent e3db367 commit dbc8f60

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/ConvertKit_API.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ private function strip_html_head_body_tags(string $markup)
15621562
* @return array<string, string|integer>
15631563
*/
15641564
private function build_pagination_params(
1565-
array $params,
1565+
array $params = [],
15661566
string $after_cursor = '',
15671567
string $before_cursor = '',
15681568
int $per_page = 100

tests/ConvertKitAPITest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,20 +639,22 @@ public function testGetFormSubscriptionsWithInvalidFormID()
639639
*/
640640
public function testGetSequences()
641641
{
642-
$this->markTestIncomplete();
643-
644642
$result = $this->api->get_sequences();
645-
$this->assertInstanceOf('stdClass', $result);
643+
644+
// Assert sequences and pagination exist.
645+
$this->assertDataExists($result, 'sequences');
646+
$this->assertPaginationExists($result);
646647

647648
// Check first sequence in resultset has expected data.
648-
$sequence = get_object_vars($result->courses[0]);
649+
$sequence = get_object_vars($result->sequences[0]);
649650
$this->assertArrayHasKey('id', $sequence);
650651
$this->assertArrayHasKey('name', $sequence);
651652
$this->assertArrayHasKey('hold', $sequence);
652653
$this->assertArrayHasKey('repeat', $sequence);
653654
$this->assertArrayHasKey('created_at', $sequence);
654655
}
655656

657+
656658
/**
657659
* Test that add_subscriber_to_sequence() returns the expected data.
658660
*

0 commit comments

Comments
 (0)