This commit is contained in:
Nyholm 2018-08-05 12:44:59 +02:00 committed by David Garcia
parent 17eafbf9c9
commit 61c0f32dfb
7 changed files with 47 additions and 17 deletions

View File

@ -2,9 +2,15 @@
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;
class BaseModelTest extends \PHPUnit_Framework_TestCase
{
}

View File

@ -2,6 +2,13 @@
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\Domain;
use Mailgun\Model\Domain\ConnectionResponse;
@ -12,7 +19,7 @@ class ConnectionResponseTest extends BaseModelTest
public function testCreate()
{
$json =
<<<JSON
<<<'JSON'
{
"connection": {
"require_tls": false,

View File

@ -2,9 +2,15 @@
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\Domain;
use Mailgun\Model\Domain\ConnectionResponse;
use Mailgun\Model\Domain\CreateCredentialResponse;
use Mailgun\Tests\Model\BaseModelTest;
@ -13,7 +19,7 @@ class CreateCredentialResponseTest extends BaseModelTest
public function testCreate()
{
$json =
<<<JSON
<<<'JSON'
{
"message": "Created 1 credentials pair(s)"
}

View File

@ -2,12 +2,16 @@
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\Domain;
use Mailgun\Model\Domain\ConnectionResponse;
use Mailgun\Model\Domain\CreateCredentialResponse;
use Mailgun\Model\Domain\CreateResponse;
use Mailgun\Model\Domain\CredentialResponse;
use Mailgun\Tests\Model\BaseModelTest;
class CreateResponseTest extends BaseModelTest
@ -15,7 +19,7 @@ class CreateResponseTest extends BaseModelTest
public function testCreate()
{
$json =
<<<JSON
<<<'JSON'
{
"domain": {
"name": "example.com",

View File

@ -2,11 +2,15 @@
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\Domain;
use Mailgun\Model\Domain\ConnectionResponse;
use Mailgun\Model\Domain\CreateCredentialResponse;
use Mailgun\Model\Domain\CredentialResponse;
use Mailgun\Model\Domain\CredentialResponseItem;
use Mailgun\Tests\Model\BaseModelTest;
@ -15,7 +19,7 @@ class CredentialResponseItemTest extends BaseModelTest
public function testCreate()
{
$json =
<<<JSON
<<<'JSON'
{
"size_bytes": 5,
"created_at": "Tue, 27 Sep 2011 20:24:22 GMT",

View File

@ -2,10 +2,15 @@
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\Domain;
use Mailgun\Model\Domain\ConnectionResponse;
use Mailgun\Model\Domain\CreateCredentialResponse;
use Mailgun\Model\Domain\CredentialResponse;
use Mailgun\Tests\Model\BaseModelTest;
@ -14,7 +19,7 @@ class CredentialResponseTest extends BaseModelTest
public function testCreate()
{
$json =
<<<JSON
<<<'JSON'
{
"total_count": 2,
"items": [
@ -36,6 +41,5 @@ JSON;
$model = CredentialResponse::create(json_decode($json, true));
$this->assertEquals(2, $model->getTotalCount());
$this->assertCount(2, $model->getCredentials());
}
}

View File

@ -11,7 +11,6 @@ namespace Mailgun\Tests\Model\Suppression\Unsubscribe;
use Mailgun\Model\Suppression\Unsubscribe\Unsubscribe;
use Mailgun\Tests\Model\BaseModelTest;
use PHPUnit_Framework_TestCase;
class UnsubscribeTest extends BaseModelTest
{