| @@ 31-39 (lines=9) @@ | ||
| 28 | $this->history = new WeatherHistory($this->fakeJson, 'Berlin'); |
|
| 29 | } |
|
| 30 | ||
| 31 | public function testRewind() |
|
| 32 | { |
|
| 33 | $expectIndex = 0; |
|
| 34 | $history = $this->history; |
|
| 35 | $history->rewind(); |
|
| 36 | $position = $history->key(); |
|
| 37 | ||
| 38 | $this->assertSame($expectIndex, $position); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testCurrent() |
|
| 42 | { |
|
| @@ 50-58 (lines=9) @@ | ||
| 47 | $this->assertInternalType('object', $current); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function testNext() |
|
| 51 | { |
|
| 52 | $expectIndex = 1; |
|
| 53 | $history = $this->history; |
|
| 54 | $history->next(); |
|
| 55 | $position = $history->key(); |
|
| 56 | ||
| 57 | $this->assertSame($expectIndex, $position); |
|
| 58 | } |
|
| 59 | ||
| 60 | public function testValid() |
|
| 61 | { |
|