mailgun-php/tests/Model/Webhook/ShowResponseTest.php
2021-03-08 07:22:58 +00:00

37 lines
674 B
PHP

<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Mailgun\Tests\Model\Webhook;
use Mailgun\Model\Webhook\ShowResponse;
use Mailgun\Tests\Model\BaseModelTest;
class ShowResponseTest extends BaseModelTest
{
public function testHook1()
{
$json =
<<<'JSON'
{
"webhook": {
"urls": [
"http:\/\/example.com\/hook_1"
]
}
}
JSON;
$model = ShowResponse::create(json_decode($json, true));
$this->assertContains('http://example.com/hook_1', $model->getWebhookUrls());
}
}