public function seek($position) { $position = (int) $position; if (0 > $position) { $position = 0; } $this->current = $position; }
public function testApiSeek_WhenInvalidPositionIsPassed() { $this->iterator->seek(-1); $this->assertSame(0, $this->iterator->key()); }