Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 359dc36

Browse filesBrowse files
Guikingonenicolas-grekas
authored andcommitted
Add tests
1 parent 6476478 commit 359dc36
Copy full SHA for 359dc36

File tree

5 files changed

+696
-7
lines changed
Filter options

5 files changed

+696
-7
lines changed
+28Lines 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 <fabien@symfony.com>
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+
}
+25Lines 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 <fabien@symfony.com>
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

Copy file name to clipboardExpand all lines: src/Symfony/Contracts/HttpClient/ApiClientInterface.php
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.