tests/Unit/ClientFactory/BuzzFactoryTest.php 1 location
|
@@ 13-26 (lines=14) @@
|
| 10 |
|
/** |
| 11 |
|
* @author Tobias Nyholm <[email protected]> |
| 12 |
|
*/ |
| 13 |
|
class BuzzFactoryTest extends TestCase |
| 14 |
|
{ |
| 15 |
|
public function testCreateClient() |
| 16 |
|
{ |
| 17 |
|
if (!class_exists(\Http\Adapter\Buzz\Client::class)) { |
| 18 |
|
$this->markTestSkipped('Buzz adapter is not installed'); |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
$factory = new BuzzFactory($this->getMockBuilder(MessageFactory::class)->getMock()); |
| 22 |
|
$client = $factory->createClient(); |
| 23 |
|
|
| 24 |
|
$this->assertInstanceOf(Client::class, $client); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
tests/Unit/ClientFactory/CurlFactoryTest.php 1 location
|
@@ 14-30 (lines=17) @@
|
| 11 |
|
/** |
| 12 |
|
* @author Tobias Nyholm <[email protected]> |
| 13 |
|
*/ |
| 14 |
|
class CurlFactoryTest extends TestCase |
| 15 |
|
{ |
| 16 |
|
public function testCreateClient() |
| 17 |
|
{ |
| 18 |
|
if (!class_exists(\Http\Client\Curl\Client::class)) { |
| 19 |
|
$this->markTestSkipped('Curl client is not installed'); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
$factory = new CurlFactory( |
| 23 |
|
$this->getMockBuilder(MessageFactory::class)->getMock(), |
| 24 |
|
$this->getMockBuilder(StreamFactory::class)->getMock() |
| 25 |
|
); |
| 26 |
|
$client = $factory->createClient(); |
| 27 |
|
|
| 28 |
|
$this->assertInstanceOf(Client::class, $client); |
| 29 |
|
} |
| 30 |
|
} |
| 31 |
|
|
tests/Unit/ClientFactory/ReactFactoryTest.php 1 location
|
@@ 13-26 (lines=14) @@
|
| 10 |
|
/** |
| 11 |
|
* @author Tobias Nyholm <[email protected]> |
| 12 |
|
*/ |
| 13 |
|
class ReactFactoryTest extends TestCase |
| 14 |
|
{ |
| 15 |
|
public function testCreateClient() |
| 16 |
|
{ |
| 17 |
|
if (!class_exists(\Http\Adapter\React\Client::class)) { |
| 18 |
|
$this->markTestSkipped('React adapter is not installed'); |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
$factory = new ReactFactory($this->getMockBuilder(MessageFactory::class)->getMock()); |
| 22 |
|
$client = $factory->createClient(); |
| 23 |
|
|
| 24 |
|
$this->assertInstanceOf(Client::class, $client); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
tests/Unit/ClientFactory/SocketFactoryTest.php 1 location
|
@@ 13-26 (lines=14) @@
|
| 10 |
|
/** |
| 11 |
|
* @author Tobias Nyholm <[email protected]> |
| 12 |
|
*/ |
| 13 |
|
class SocketFactoryTest extends TestCase |
| 14 |
|
{ |
| 15 |
|
public function testCreateClient() |
| 16 |
|
{ |
| 17 |
|
if (!class_exists(\Http\Client\Socket\Client::class)) { |
| 18 |
|
$this->markTestSkipped('Socket client is not installed'); |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
$factory = new SocketFactory($this->getMockBuilder(MessageFactory::class)->getMock()); |
| 22 |
|
$client = $factory->createClient(); |
| 23 |
|
|
| 24 |
|
$this->assertInstanceOf(Client::class, $client); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|