Skip to content

Commit 7855a15

Browse files
committed
Adding failing tests for #206
1 parent c17747a commit 7855a15

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Tests/Functional/Issue206.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Http\HttplugBundle\Tests\Functional;
6+
7+
use Http\Client\Common\HttpMethodsClient;
8+
use Http\Client\Common\PluginClientFactory;
9+
use Http\Discovery\HttpClientDiscovery;
10+
use Http\Discovery\MessageFactoryDiscovery;
11+
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
12+
use Http\HttplugBundle\Collector\PluginClientFactory as DebugFactory;
13+
14+
class Issue206 extends WebTestCase
15+
{
16+
public function testCustomClientStillAvailable()
17+
{
18+
static::bootKernel();
19+
$container = static::$kernel->getContainer();
20+
PluginClientFactory::setFactory([$container->get('Http\Client\Common\PluginClientFactory'), 'createClient']);
21+
22+
// Create a client
23+
$myCustomClient = new HttpMethodsClient(HttpClientDiscovery::find(), MessageFactoryDiscovery::find());
24+
$pluginClient = (new PluginClientFactory())->createClient($myCustomClient, []);
25+
}
26+
}

0 commit comments

Comments
 (0)