blob: 8ae80de7b984ec91305fed04c52db9db7f17514f (
plain)
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
namespace SparkPost\Test;
use SparkPost\APIResponseException;
class APIResourceExceptionTest extends \PHPUnit_Framework_TestCase
{
private $message;
private $code;
private $description;
private $exception;
/**
* (non-PHPdoc).
*
* @before
*
* @see PHPUnit_Framework_TestCase::setUp()
*/
public function setUp()
{
$this->message = 'Test message';
$this->code = 400;
$this->description = 'Test description';
$this->exception = new APIResponseException(null, 0, $this->message, $this->code, $this->description);
}
public function testAPIMessage()
{
$this->assertEquals($this->message, $this->exception->getAPIMessage());
}
public function testAPICode()
{
$this->assertEquals($this->code, $this->exception->getAPICode());
}
public function testAPIDescription()
{
$this->assertEquals($this->description, $this->exception->getAPIDescription());
}
}
|