| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testStatistics() |
||
| 18 | { |
||
| 19 | $date = '2018-01-01'; |
||
| 20 | $time = '01:02:03'; |
||
| 21 | $index = 'index'; |
||
| 22 | $key = 'key'; |
||
| 23 | $timestamp = \DateTime::createFromFormat('Y-m-d H:i:s', "{$date} {$time}"); |
||
| 24 | $value = 321; |
||
| 25 | |||
| 26 | $statistics = (new Statistics()) |
||
| 27 | ->setIndex($index) |
||
| 28 | ->setKey($key) |
||
| 29 | ->setTimestamp($timestamp) |
||
|
|
|||
| 30 | ->setValue($value); |
||
| 31 | |||
| 32 | $this->assertNull($statistics->getId()); |
||
| 33 | $this->assertSame($index, $statistics->getIndex()); |
||
| 34 | $this->assertSame($key, $statistics->getKey()); |
||
| 35 | $this->assertSame($timestamp, $statistics->getTimestamp()); |
||
| 36 | $this->assertSame($value, $statistics->getValue()); |
||
| 37 | $this->assertSame($date, $statistics->getDate()); |
||
| 38 | $this->assertSame("{$date} {$time}", $statistics->getDateTime()); |
||
| 39 | } |
||
| 41 |