Skip to content

Commit d6b8510

Browse files
committed
Remove other test
1 parent 5a5bfaf commit d6b8510

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

tests/Controllers/WebhooksControllerTest.php

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

44-
/**
45-
* Update a webhook. You can update individual attributes or all of them by submitting a PATCH request to the /webhooks/messages endpoint (the same endpoint used above to delete a webhook)
46-
A successful request to the retrieve webhook endpoint will return a response body as follows:
47-
```
48-
{
49-
"url": "https://webhook.com",
50-
"method": "POST",
51-
"id": "04442623-0961-464e-9cbc-ec50804e0413",
52-
"encoding": "JSON",
53-
"events": [
54-
"RECEIVED_SMS"
55-
],
56-
"headers": {},
57-
"template": "{\"id\":\"$mtId\", \"status\":\"$statusCode\"}"
58-
}
59-
```
60-
*Note: Only pre-created webhooks can be deleted. If an invalid or non existent webhook ID parameter is specified in the request, then a HTTP 404 Not Found response will be returned.*
61-
*/
62-
public function testUpdateWebhook1()
63-
{
64-
// Parameters for the API call
65-
$webhookId = 'a7f11bb0-f299-4861-a5ca-9b29d04bc5ad';
66-
$body = TestHelper::getJsonMapper()->mapClass(json_decode(
67-
' { \"url\": \"https://myurl.com\", \"method\": \"POST\", \"encoding\": \"FOR" .
68-
"M_ENCODED\", \"events\": [ \"ENROUTE_DR\" ], \"template\": \"{\\\"id" .
69-
"\\\":\\\"$mtId\\\", \\\"status\\\":\\\"$statusCode\\\"}\" }'),
70-
'MessageMediaWebhooksLib\\Models\\UpdateWebhookRequest'
71-
);
72-
73-
// Set callback and perform API call
74-
$result = null;
75-
self::$controller->setHttpCallBack($this->httpResponse);
76-
try {
77-
$result = self::$controller->updateWebhook($webhookId, $body);
78-
} catch (APIException $e) {
79-
}
8044

81-
// Test response code
82-
$this->assertEquals(
83-
200,
84-
$this->httpResponse->getResponse()->getStatusCode(),
85-
"Status is not 200"
86-
);
87-
88-
$this->assertCount(
89-
count($headers),
90-
$this->httpResponse->getResponse()->getHeaders(),
91-
"Headers do not match strictly"
92-
);
93-
}
9445
}

0 commit comments

Comments
 (0)