| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function testInstrumentInfoResponse() |
||
| 16 | { |
||
| 17 | $indexPriceKlineData = ResponseHandlerBuilder::make(self::$indexPriceKlineApiResponse, |
||
| 18 | CurlResponseHandler::class, IndexPriceKlineResponse::class, EnumOutputMode::MODE_ENTITY); |
||
| 19 | |||
| 20 | $this->assertInstanceOf(EntityCollection::class, $indexPriceKlineData->getBody()); |
||
| 21 | |||
| 22 | $this->assertNotEmpty($indexPriceKlineData->getBody()->count()); |
||
| 23 | |||
| 24 | /** @var IndexPriceKlineResponse $klineItem */ |
||
| 25 | while(!empty($klineItem = $indexPriceKlineData->getBody()->fetch())) { |
||
| 26 | $this->assertInstanceOf(IndexPriceKlineResponse::class, $klineItem); |
||
| 27 | $this->assertInstanceOf(\DateTime::class, $klineItem->getStart()); |
||
| 28 | $this->assertIsFloat($klineItem->getOpen()); |
||
| 29 | $this->assertIsFloat($klineItem->getHigh()); |
||
| 30 | $this->assertIsFloat($klineItem->getLow()); |
||
| 31 | $this->assertIsFloat($klineItem->getClose()); |
||
| 32 | } |
||
| 34 | } |