We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89f4b88 commit ea92379Copy full SHA for ea92379
tests/ConvertKitAPITest.php
@@ -793,6 +793,24 @@ public function testCreatePurchase()
793
$this->assertArrayHasKey('transaction_id', get_object_vars($purchase));
794
}
795
796
+ /**
797
+ * Test that create_purchase() throws a ClientException when an invalid
798
+ * purchase data is specified.
799
+ *
800
+ * @since 1.0.0
801
802
+ * @return void
803
+ */
804
+ public function testCreatePurchaseWithMissingData()
805
+ {
806
+ $this->expectException(GuzzleHttp\Exception\ClientException::class);
807
+ $this->api->create_purchase([
808
+ 'invalid-key' => [
809
+ 'transaction_id' => str_shuffle('wfervdrtgsdewrafvwefds'),
810
+ ],
811
+ ]);
812
+ }
813
+
814
/**
815
* Test that fetching a legacy form's markup works.
816
*
0 commit comments