1 | <?php |
||
13 | class EcbClientMock implements EcbClientInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @const string |
||
18 | */ |
||
19 | const VALID_RESPONSE = 'ValidResponse'; |
||
20 | |||
21 | /** |
||
22 | * @const string |
||
23 | */ |
||
24 | const USD_MISSING_RESPONSE = 'UsdMissingResponse'; |
||
25 | |||
26 | /** |
||
27 | * @const string |
||
28 | */ |
||
29 | const DATE_MISSING_RESPONSE = 'DateMissingResponse'; |
||
30 | |||
31 | /** |
||
32 | * @var ResponseInterface |
||
33 | */ |
||
34 | private $response; |
||
35 | |||
36 | /** |
||
37 | * @var MapperInterface |
||
38 | */ |
||
39 | private $mapper; |
||
40 | |||
41 | /** |
||
42 | * @param string $expectedResponse |
||
43 | * @param CacheInterface $cache |
||
44 | * @param int $cacheTimeInSeconds |
||
45 | * @param MapperInterface $mapper |
||
46 | */ |
||
47 | public function __construct(string $expectedResponse = self::VALID_RESPONSE, |
||
70 | |||
71 | /** |
||
72 | * @throws ExchangeRatesRequestFailedException |
||
73 | * @return ExchangeRate[] |
||
74 | */ |
||
75 | public function getExchangeRates(): array |
||
79 | |||
80 | /** |
||
81 | * @param string $file |
||
82 | * @return Response |
||
83 | */ |
||
84 | private function createResponseFromFile(string $file): Response |
||
88 | |||
89 | } |