| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | protected static function createClient(array $options = []): Client |
||
| 34 | { |
||
| 35 | $kernel = static::bootKernel($options); |
||
| 36 | |||
| 37 | try { |
||
| 38 | /** |
||
| 39 | * @var Client |
||
| 40 | */ |
||
| 41 | $client = $kernel->getContainer()->get('test.api_platform.client'); |
||
| 42 | } catch (ServiceNotFoundException $e) { |
||
| 43 | throw new \LogicException('You cannot create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit".'); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $client; |
||
| 47 | } |
||
| 49 |