| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | protected static function createClient(array $options = []) |
||
| 36 | { |
||
| 37 | $kernel = static::bootKernel($options); |
||
| 38 | |||
| 39 | try { |
||
| 40 | $client = $kernel->getContainer()->get('test.api_platform.client'); |
||
| 41 | } catch (ServiceNotFoundException $e) { |
||
| 42 | 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".'); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $client; |
||
| 46 | } |
||
| 48 |