|
13 | 13 |
|
14 | 14 | namespace Symfony\Component\Panther;
|
15 | 15 |
|
16 |
| -use Goutte\Client as GoutteClient; |
17 |
| -use GuzzleHttp\Client as GuzzleClient; |
18 | 16 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
19 | 17 | use Symfony\Component\BrowserKit\HttpBrowser as HttpBrowserClient;
|
20 | 18 | use Symfony\Component\HttpClient\HttpClient;
|
@@ -50,13 +48,6 @@ trait PantherTestCaseTrait
|
50 | 48 | */
|
51 | 49 | protected static $baseUri;
|
52 | 50 |
|
53 |
| - /** |
54 |
| - * @var GoutteClient|null |
55 |
| - * |
56 |
| - * @deprecated since Panther 0.7 |
57 |
| - */ |
58 |
| - protected static $goutteClient; |
59 |
| - |
60 | 51 | /**
|
61 | 52 | * @var HttpBrowserClient|null
|
62 | 53 | */
|
@@ -110,10 +101,6 @@ public static function stopWebServer(): void
|
110 | 101 | self::$pantherClients = [];
|
111 | 102 | }
|
112 | 103 |
|
113 |
| - if (null !== self::$goutteClient) { |
114 |
| - self::$goutteClient = null; |
115 |
| - } |
116 |
| - |
117 | 104 | if (null !== self::$httpBrowserClient) {
|
118 | 105 | self::$httpBrowserClient = null;
|
119 | 106 | }
|
@@ -207,33 +194,6 @@ protected static function createAdditionalPantherClient(): PantherClient
|
207 | 194 | return self::$pantherClient;
|
208 | 195 | }
|
209 | 196 |
|
210 |
| - /** |
211 |
| - * @param array $options see {@see $defaultOptions} |
212 |
| - * |
213 |
| - * @deprecated since Panther 0.7, use createHttpBrowserClient instead |
214 |
| - */ |
215 |
| - protected static function createGoutteClient(array $options = [], array $kernelOptions = []): GoutteClient |
216 |
| - { |
217 |
| - if (!\class_exists(GoutteClient::class)) { |
218 |
| - throw new \RuntimeException('Goutte is not installed. Run "composer req fabpot/goutte".'); |
219 |
| - } |
220 |
| - |
221 |
| - self::startWebServer($options); |
222 |
| - if (null === self::$goutteClient) { |
223 |
| - $goutteClient = new GoutteClient(); |
224 |
| - $goutteClient->setClient(new GuzzleClient(['base_uri' => self::$baseUri])); |
225 |
| - |
226 |
| - self::$goutteClient = $goutteClient; |
227 |
| - } |
228 |
| - |
229 |
| - if (\is_a(self::class, KernelTestCase::class, true)) { |
230 |
| - static::bootKernel($kernelOptions); // @phpstan-ignore-line |
231 |
| - } |
232 |
| - |
233 |
| - // It's not possible to use assertions with Goutte yet, https://github.com/FriendsOfPHP/Goutte/pull/382 needed |
234 |
| - return self::$goutteClient; |
235 |
| - } |
236 |
| - |
237 | 197 | /**
|
238 | 198 | * @param array $options see {@see $defaultOptions}
|
239 | 199 | */
|
|
0 commit comments