Skip to content

Commit 93ab348

Browse files
committed
Add test suite for sync and async requests
1 parent 13d0012 commit 93ab348

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

tests/ReactHttpAsyncClientTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace Http\Adapter\Tests;
4+
5+
use Http\Client\Tests\HttpAsyncClientTest;
6+
use Http\Adapter\ReactHttpClient;
7+
8+
/**
9+
* @author Stéphane Hulard <[email protected]>
10+
*/
11+
class ReactHttpAsyncClientTest extends HttpAsyncClientTest
12+
{
13+
/**
14+
* @return HttpClient
15+
*/
16+
protected function createHttpAsyncClient()
17+
{
18+
$messageFactory = new \Http\Discovery\MessageFactory\GuzzleFactory();
19+
20+
return new ReactHttpClient(
21+
$messageFactory
22+
);
23+
}
24+
}

tests/ReactHttpClientTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Http\Adapter\Tests;
4+
5+
use Http\Client\Tests\HttpClientTest;
6+
use Http\Adapter\ReactHttpClient;
7+
8+
/**
9+
* @author Stéphane Hulard <[email protected]>
10+
*/
11+
class ReactHttpClientTest extends HttpClientTest
12+
{
13+
/**
14+
* @return HttpClient
15+
*/
16+
protected function createHttpAdapter()
17+
{
18+
$messageFactory = new \Http\Discovery\MessageFactory\GuzzleFactory();
19+
return new ReactHttpClient($messageFactory);
20+
}
21+
}

0 commit comments

Comments
 (0)