summaryrefslogtreecommitdiffstats
path: root/test/unit/APIResourceExceptionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/APIResourceExceptionTest.php')
-rw-r--r--test/unit/APIResourceExceptionTest.php61
1 files changed, 34 insertions, 27 deletions
diff --git a/test/unit/APIResourceExceptionTest.php b/test/unit/APIResourceExceptionTest.php
index 5bb4758..8ae80de 100644
--- a/test/unit/APIResourceExceptionTest.php
+++ b/test/unit/APIResourceExceptionTest.php
@@ -1,36 +1,43 @@
<?php
-namespace SparkPost\Test;
-use SparkPost\APIResponseException;
-class APIResourceExceptionTest extends \PHPUnit_Framework_TestCase {
+namespace SparkPost\Test;
- private $message;
- private $code;
- private $description;
- private $exception;
+use SparkPost\APIResponseException;
- /**
- * (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);
- }
+class APIResourceExceptionTest extends \PHPUnit_Framework_TestCase
+{
+ private $message;
+ private $code;
+ private $description;
+ private $exception;
- public function testAPIMessage() {
- $this->assertEquals($this->message, $this->exception->getAPIMessage());
- }
+ /**
+ * (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 testAPICode() {
- $this->assertEquals($this->code, $this->exception->getAPICode());
- }
+ public function testAPIMessage()
+ {
+ $this->assertEquals($this->message, $this->exception->getAPIMessage());
+ }
- public function testAPIDescription() {
- $this->assertEquals($this->description, $this->exception->getAPIDescription());
- }
+ public function testAPICode()
+ {
+ $this->assertEquals($this->code, $this->exception->getAPICode());
+ }
+ public function testAPIDescription()
+ {
+ $this->assertEquals($this->description, $this->exception->getAPIDescription());
+ }
}