public function testGetForPeriod() { $Client = new Client(); $begin = '2015-10-10'; $end = '2015-10-15'; $Result = $Client->getForPeriod('USD', 'EUR', $begin, $end); $this->assertCount(6, $Result); $beginTs = strtotime($begin); $endTs = strtotime($end); foreach ($Result as $Item) { $this->assertInstanceOf(PairRateData::class, $Item); $ts = strtotime($Item->getDate()); if ($ts > $endTs || $ts < $beginTs) { $this->fail('date not in period'); } $this->assertNotEmpty($Item->getRate()); } }