@@ -33,8 +33,8 @@ class FapiClientExchangeRatesTest extends TestCase
3333 );
3434
3535 $ this ->fapiClient = new FapiClient (
36- 'test1@ slischka.cz ' ,
37- 'pi120wrOyzNlb7p4iQwTO1vcK ' ,
36+ 'slischka@test-fapi .cz ' ,
37+ 'jIBAWlKzzB6rQVk5Y3T0VxTgn ' ,
3838 'https://api.fapi.cz/ ' ,
3939 $ this ->httpClient
4040 );
@@ -49,35 +49,35 @@ class FapiClientExchangeRatesTest extends TestCase
4949 {
5050 Assert::exception (function () {
5151 $ this ->fapiClient ->getExchangeRates ()->list ();
52- }, ValidationException::class, 'Parameter source is not valid. ' );
52+ }, ValidationException::class, 'Missing key: source ' );
5353
5454 Assert::exception (function () {
5555 $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' ]);
56- }, ValidationException::class, 'Parameter target is not valid. ' );
56+ }, ValidationException::class, 'Missing key: target ' );
5757
5858 Assert::exception (function () {
5959 $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' , 'target ' => 'CZK ' ]);
6060 }, ValidationException::class, 'Parameter date_from and date_to can not be null together with parameter date. ' );
6161
62- $ exchangeRates = $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' , 'target ' => 'CZK ' , 'date ' => '2019-01-01 ' ]);
62+ $ exchangeRates = $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' , 'target ' => 'CZK ' , 'date ' => '2020-09-08 ' ]);
6363
6464 Assert::equal ([
6565 [
66- 'date ' => '2019-01-01 ' ,
66+ 'date ' => '2020-09-08 ' ,
6767 'source_currency ' => 'EUR ' ,
6868 'target_currency ' => 'CZK ' ,
69- 'exchange_rate ' => 25.725 ,
69+ 'exchange_rate ' => 26.47 ,
7070 ],
7171 ], $ exchangeRates );
7272
73- $ exchangeRate = $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' , 'target ' => 'CZK ' , 'date ' => '2019-01-01 ' , 'single ' => true ]);
73+ $ exchangeRate = $ this ->fapiClient ->getExchangeRates ()->list (['source ' => 'EUR ' , 'target ' => 'CZK ' , 'date ' => '2020-09-08 ' , 'single ' => true ]);
7474
7575 Assert::equal (
7676 [
77- 'date ' => '2019-01-01 ' ,
77+ 'date ' => '2020-09-08 ' ,
7878 'source_currency ' => 'EUR ' ,
7979 'target_currency ' => 'CZK ' ,
80- 'exchange_rate ' => 25.725 ,
80+ 'exchange_rate ' => 26.47 ,
8181 ]
8282 , $ exchangeRate );
8383
0 commit comments