-
Notifications
You must be signed in to change notification settings - Fork 626
/
Copy pathBypassBounceManagementTest.php
43 lines (35 loc) · 1.13 KB
/
BypassBounceManagementTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* This file tests BypassBounceManagement.
*/
namespace SendGrid\Tests\Unit;
use PHPUnit\Framework\TestCase;
use SendGrid\Mail\BypassBounceManagement;
use SendGrid\Mail\TypeException;
/**
* This file tests BypassBounceManagement.
*
* @package SendGrid\Tests
*/
class BypassBounceManagementTest extends TestCase
{
public function testConstructor()
{
$bypassBounceManagement = new BypassBounceManagement(true);
$this->assertInstanceOf(BypassBounceManagement::class, $bypassBounceManagement);
$this->assertTrue($bypassBounceManagement->getEnable());
}
public function testSetEnable()
{
$bypassBounceManagement = new BypassBounceManagement();
$bypassBounceManagement->setEnable(true);
$this->assertTrue($bypassBounceManagement->getEnable());
}
public function testSetEnableOnInvalidType()
{
$this->expectException(TypeException::class);
$this->expectExceptionMessageMatches('/"\$enable" must be a boolean/');
$bypassBounceManagement = new BypassBounceManagement();
$bypassBounceManagement->setEnable('invalid_bool_type');
}
}