-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathIssue206.php
More file actions
28 lines (22 loc) · 952 Bytes
/
Issue206.php
File metadata and controls
28 lines (22 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
declare(strict_types=1);
namespace Http\HttplugBundle\Tests\Functional;
use Http\Client\Common\HttpMethodsClient;
use Http\Client\Common\PluginClientFactory;
use Http\Discovery\Psr18ClientDiscovery;
use Nyholm\Psr7\Factory\Psr17Factory;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
final class Issue206 extends WebTestCase
{
public function testCustomClientDoesNotCauseException(): void
{
static::bootKernel();
$container = static::$kernel->getContainer();
PluginClientFactory::setFactory([$container->get(PluginClientFactory::class), 'createClient']);
// Create a client
$myCustomClient = new HttpMethodsClient(Psr18ClientDiscovery::find(), new Psr17Factory(), new Psr17Factory());
$pluginClient = (new PluginClientFactory())->createClient($myCustomClient, []);
// If we get to this line, no exceptions has been thrown.
$this->addToAssertionCount(1);
}
}