Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Guikingone authored and nicolas-grekas committed Mar 10, 2019
1 parent 005cf9e commit a4fd5d9
Show file tree
Hide file tree
Showing 5 changed files with 715 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/Symfony/Component/HttpClient/Tests/CurlApiClientTest.php
@@ -0,0 +1,28 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\HttpClient\Tests;

use Symfony\Component\HttpClient\ApiClient;
use Symfony\Component\HttpClient\CurlHttpClient;
use Symfony\Contracts\HttpClient\ApiClientInterface;
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;

/**
* @requires extension curl
*/
class CurlApiClientTest extends ApiClientTestCase
{
protected function getApiClient(): ApiClientInterface
{
return new ApiClient(new CurlHttpClient());
}
}
25 changes: 25 additions & 0 deletions src/Symfony/Component/HttpClient/Tests/NativeApiClientTest.php
@@ -0,0 +1,25 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\HttpClient\Tests;

use Symfony\Component\HttpClient\ApiClient;
use Symfony\Component\HttpClient\NativeHttpClient;
use Symfony\Contracts\HttpClient\ApiClientInterface;
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;

class NativeApiClientTest extends ApiClientTestCase
{
protected function getApiClient(): ApiClientInterface
{
return new ApiClient(new NativeHttpClient());
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Contracts/HttpClient/ApiClientInterface.php
Expand Up @@ -12,7 +12,7 @@
namespace Symfony\Contracts\HttpClient;

use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\Tests\HttpClient\ApiClientTest;
use Symfony\Contracts\HttpClient\Test\ApiClientTestCase;

/**
* Provides flexible methods for interacting with HTTP APIs.
Expand Down

0 comments on commit a4fd5d9

Please sign in to comment.