Completed
Push — master ( 6fe931...06ed76 )
by WEBEWEB
04:36
created

CURLRequestCallExceptionTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the curl-library package.
5
 *
6
 * (c) 2017 NdC/WBW
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\CURL\Tests\Exception;
13
14
use PHPUnit_Framework_TestCase;
15
use WBW\Library\CURL\Exception\CURLRequestCallException;
16
use WBW\Library\CURL\Response\CURLResponse;
17
18
/**
19
 * CURL request call exception test.
20
 *
21
 * @author NdC/WBW <https://github.com/webeweb/>
22
 * @package WBW\Library\CURL\Tests\Exception
23
 * @final
24
 */
25
final class CURLRequestCallExceptionTest extends PHPUnit_Framework_TestCase {
26
27
	/**
28
	 * Tests the __constructor() method.
29
	 *
30
	 * @return void
31
	 */
32
	public function testConstructor() {
33
34
		$obj = new CURLRequestCallException("exception", new CURLResponse());
35
36
		$this->assertEquals("exception", $obj->getMessage());
37
		$this->assertEquals(null, $obj->getResponse()->getRequestBody());
38
		$this->assertEquals([], $obj->getResponse()->getRequestHeader());
39
		$this->assertEquals(null, $obj->getResponse()->getRequestURL());
40
		$this->assertEquals(null, $obj->getResponse()->getResponseBody());
41
		$this->assertEquals([], $obj->getResponse()->getResponseHeader());
42
		$this->assertEquals([], $obj->getResponse()->getResponseInfo());
43
	}
44
45
}
46