| Total Complexity | 4 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | // class MockResolver implements DispatcherInterface |
||
| 12 | // { |
||
| 13 | // protected $url = null; |
||
| 14 | |||
| 15 | // protected $expectedContent = null; |
||
| 16 | |||
| 17 | // /** |
||
| 18 | // * Constructor. Sets the url. |
||
| 19 | // * |
||
| 20 | // * @param string $url The url value |
||
| 21 | // * @param array $config The resolver configuration |
||
| 22 | // */ |
||
| 23 | // public function __construct($url, array $config) |
||
| 24 | // { |
||
| 25 | // $this->url = $url; |
||
| 26 | // if (empty($config['expectedContent'])) { |
||
| 27 | // throw new InvalidArgumentException("Mock resolvers need expectedContent"); |
||
| 28 | // } |
||
| 29 | // $this->expectedContent = $config['expectedContent']; |
||
| 30 | // } |
||
| 31 | |||
| 32 | // /** |
||
| 33 | // * Dispatch an url. |
||
| 34 | // * |
||
| 35 | // * @param Url $url |
||
| 36 | // * |
||
| 37 | // * @return Response |
||
| 38 | // */ |
||
| 39 | // public function dispatch(Url $url) |
||
| 40 | // { |
||
| 41 | // return new Response( |
||
| 42 | // $url, |
||
| 43 | // $url, |
||
| 44 | // 200, |
||
| 45 | // 'application/json', |
||
| 46 | // $this->expectedContent, |
||
| 47 | // [], |
||
| 48 | // [] |
||
| 49 | // ); |
||
| 50 | // } |
||
| 51 | |||
| 52 | // /** |
||
| 53 | // * Resolve multiple image urls at once. |
||
| 54 | // * |
||
| 55 | // * @param Url[] $urls |
||
| 56 | // * |
||
| 57 | // * @return ImageResponse[] |
||
| 58 | // */ |
||
| 59 | // public function dispatchImages(array $urls) |
||
| 60 | // { |
||
| 61 | // return []; |
||
| 62 | // } |
||
| 64 |