17 $this->_model = $this->getMockForAbstractClass(
19 [[
'key1',
'key2',
'key3']]
38 return [
'empty column names' => [[]],
'duplicate column names' => [[
'1',
'2',
'1']]];
43 $this->assertSame([
'key1',
'key2',
'key3'], $this->_model->getColNames());
52 $this->assertSame(-1, $this->_model->key());
53 $this->assertFalse($this->_model->valid());
55 $this->_model->expects(
60 $this->onConsecutiveCalls([1, 2, 3], [4, 5, 5], [6, 7, 8], [])
63 foreach ($this->_model as $key =>
$value) {
68 [
'key1' => 1,
'key2' => 2,
'key3' => 3],
69 [
'key1' => 4,
'key2' => 5,
'key3' => 5],
70 [
'key1' => 6,
'key2' => 7,
'key3' => 8],
74 $this->_model->current();
79 $this->assertSame(-1, $this->_model->key());
80 $this->_model->seek(-1);
81 $this->assertSame(-1, $this->_model->key());
83 $this->_model->expects(
88 $this->onConsecutiveCalls([1, 2, 3], [4, 5, 5], [6, 7, 8], [1, 2, 3], [4, 5, 5])
90 $this->_model->seek(2);
91 $this->assertSame([
'key1' => 6,
'key2' => 7,
'key3' => 8], $this->_model->current());
92 $this->_model->seek(1);
93 $this->assertSame([
'key1' => 4,
'key2' => 5,
'key3' => 5], $this->_model->current());
101 $this->_model->seek(0);
constructExceptionDataProvider()
testConstructException($argument)
testSeekableInterfaceException()