|
@@ 60-71 (lines=12) @@
|
| 57 |
|
* |
| 58 |
|
* @covers \Unikorp\KongAdminApi\Client::__construct |
| 59 |
|
*/ |
| 60 |
|
public function testConstructorSetHttpClient() |
| 61 |
|
{ |
| 62 |
|
// reflect `client` |
| 63 |
|
$reflectionClass = new \ReflectionClass($this->client); |
| 64 |
|
|
| 65 |
|
// set `http client` property from `client` accessible |
| 66 |
|
$reflectionProperty = $reflectionClass->getProperty('httpClient'); |
| 67 |
|
$reflectionProperty->setAccessible(true); |
| 68 |
|
|
| 69 |
|
// asserts |
| 70 |
|
$this->assertInstanceOf('\Http\Client\HttpClient', $reflectionProperty->getValue($this->client)); |
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
/** |
| 74 |
|
* test constructor set message factory |
|
@@ 80-91 (lines=12) @@
|
| 77 |
|
* |
| 78 |
|
* @covers \Unikorp\KongAdminApi\Client::__construct |
| 79 |
|
*/ |
| 80 |
|
public function testConstructorSetMessageFactory() |
| 81 |
|
{ |
| 82 |
|
// reflect `client` |
| 83 |
|
$reflectionClass = new \ReflectionClass($this->client); |
| 84 |
|
|
| 85 |
|
// set `message factory` property from `client` accessible |
| 86 |
|
$reflectionProperty = $reflectionClass->getProperty('messageFactory'); |
| 87 |
|
$reflectionProperty->setAccessible(true); |
| 88 |
|
|
| 89 |
|
// asserts |
| 90 |
|
$this->assertInstanceOf('\Http\Message\MessageFactory', $reflectionProperty->getValue($this->client)); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
/** |
| 94 |
|
* test constructor add host plugin |