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