Skip to content

Commit 7d9cb14

Browse files
committed
Create test
1 parent d6b8510 commit 7d9cb14

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/Controllers/WebhooksControllerTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,28 @@ protected function setUp()
4141
$this->httpResponse = new HttpCallBackCatcher();
4242
}
4343

44+
/**
45+
* Retrieve Webhooks
46+
*/
47+
public function retrieveWebhooks()
48+
{
49+
// Parameters for the API call
50+
$page = 0;
51+
$pageSize = 10;
4452

53+
// Set callback and perform API call
54+
$result = null;
55+
self::$controller->setHttpCallBack($this->httpResponse);
56+
try {
57+
$result = self::$controller->retrieveWebhook($page, $pageSize);
58+
} catch (APIException $e) {
59+
}
60+
61+
// Test response code
62+
$this->assertEquals(
63+
200,
64+
$this->httpResponse->getResponse()->getStatusCode(),
65+
"Status is not 200"
66+
);
67+
}
4568
}

0 commit comments

Comments
 (0)