mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-26 06:46:08 +03:00
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
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\Event;
|
||
|
|
||
|
use Mailgun\Model\EmailValidationV4\Job;
|
||
|
use Mailgun\Model\EmailValidationV4\JobDownloadUrl;
|
||
|
use Mailgun\Model\EmailValidationV4\Summary;
|
||
|
use Mailgun\Model\EmailValidationV4\SummaryResult;
|
||
|
use Mailgun\Model\EmailValidationV4\SummaryRisk;
|
||
|
use Mailgun\Tests\Model\BaseModelTest;
|
||
|
|
||
|
class SummaryResultTest extends BaseModelTest
|
||
|
{
|
||
|
public function testCreate()
|
||
|
{
|
||
|
$json =
|
||
|
<<<'JSON'
|
||
|
{
|
||
|
"deliverable": 181854,
|
||
|
"do_not_send": 5647,
|
||
|
"undeliverable": 12116,
|
||
|
"catch_all": 2345,
|
||
|
"unknown": 5613
|
||
|
}
|
||
|
JSON;
|
||
|
$model = SummaryResult::create(json_decode($json, true));
|
||
|
$this->assertEquals(181854, $model->getDeliverable());
|
||
|
$this->assertEquals(5647, $model->getDoNotSend());
|
||
|
$this->assertEquals(12116, $model->getUndeliverable());
|
||
|
$this->assertEquals(2345, $model->getCatchAll());
|
||
|
$this->assertEquals(5613, $model->getUnknown());
|
||
|
}
|
||
|
}
|