Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80dcf41

Browse files
Guikingonenicolas-grekas
authored andcommitted
Add tests
1 parent fe68557 commit 80dcf41

File tree

4 files changed

+699
-1
lines changed

4 files changed

+699
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
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 Symfony\Component\HttpClient\Tests;
13+
14+
use Symfony\Component\HttpClient\ApiClient;
15+
use Symfony\Component\HttpClient\CurlHttpClient;
16+
use Symfony\Contracts\HttpClient\ApiClientInterface;
17+
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;
18+
19+
/**
20+
* @requires extension curl
21+
*/
22+
class CurlApiClientTest extends ApiClientTestCase
23+
{
24+
protected function getApiClient(): ApiClientInterface
25+
{
26+
return new ApiClient(new CurlHttpClient());
27+
}
28+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
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 Symfony\Component\HttpClient\Tests;
13+
14+
use Symfony\Component\HttpClient\ApiClient;
15+
use Symfony\Component\HttpClient\NativeHttpClient;
16+
use Symfony\Contracts\HttpClient\ApiClientInterface;
17+
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;
18+
19+
class NativeApiClientTest extends ApiClientTestCase
20+
{
21+
protected function getApiClient(): ApiClientInterface
22+
{
23+
return new ApiClient(new NativeHttpClient());
24+
}
25+
}

src/Symfony/Contracts/HttpClient/ApiClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Contracts\HttpClient;
1313

1414
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
15-
use Symfony\Contracts\Tests\HttpClient\ApiClientTest;
15+
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;
1616

1717
/**
1818
* Provides flexible methods for interacting with HTTP APIs.

0 commit comments

Comments
 (0)