public function testSeekableInterface() { $this->assertSame(-1, $this->_model->key()); $this->_model->seek(-1); $this->assertSame(-1, $this->_model->key()); $this->_model->expects($this->any())->method('_getNextRow')->will($this->onConsecutiveCalls(array(1, 2, 3), array(4, 5), array(6, 7, 8), array(1, 2, 3), array(4, 5))); $this->_model->seek(2); $this->assertSame(array('key1' => 6, 'key2' => 7, 'key3' => 8), $this->_model->current()); $this->_model->seek(1); $this->assertSame(array('key1' => 4, 'key2' => 5, 'key3' => ''), $this->_model->current()); }