2017-12-19 13:24:03 +03:00
|
|
|
<?php
|
|
|
|
|
2019-01-09 22:32:09 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2017-12-19 13:28:02 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Mailgun
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
2017-12-19 13:24:03 +03:00
|
|
|
namespace Mailgun\Tests\Model\Suppression\Unsubscribe;
|
|
|
|
|
|
|
|
use Mailgun\Model\Suppression\Unsubscribe\Unsubscribe;
|
2018-08-05 13:43:30 +03:00
|
|
|
use Mailgun\Tests\Model\BaseModelTest;
|
2017-12-19 13:24:03 +03:00
|
|
|
|
2018-08-05 13:43:30 +03:00
|
|
|
class UnsubscribeTest extends BaseModelTest
|
2017-12-19 13:24:03 +03:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
2021-01-30 14:43:12 +03:00
|
|
|
public function itGetsEmptyListOfTagsByDefault()
|
2017-12-19 13:24:03 +03:00
|
|
|
{
|
|
|
|
$unsubscribe = Unsubscribe::create(['address' => 'dummy@mailgun.net']);
|
|
|
|
$this->assertEquals([], $unsubscribe->getTags());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
2021-01-30 14:43:12 +03:00
|
|
|
public function itGetsTags()
|
2017-12-19 13:24:03 +03:00
|
|
|
{
|
|
|
|
$tags = ['tag1', 'tag2'];
|
|
|
|
$unsubscribe = Unsubscribe::create(['address' => 'dummy@mailgun.net', 'tags' => $tags]);
|
|
|
|
$this->assertEquals($tags, $unsubscribe->getTags());
|
|
|
|
}
|
|
|
|
}
|