Lines Matching refs:index
24 $index = $this->getIndex();
26 $index->changeRow(5, 'test');
27 $full = $this->getInaccessibleProperty($index, 'data');
30 $index->changeRow(3, 'foo');
31 $full = $this->getInaccessibleProperty($index, 'data');
34 $index->changeRow(5, 'bar');
35 $index->changeRow(7, 'bang');
37 $full = $this->getInaccessibleProperty($index, 'data');
40 $index->save();
41 $full = file($index->getFilename(), FILE_IGNORE_NEW_LINES);
47 $index = $this->getIndex();
48 $index->changeRow(5, 'test');
49 $this->assertEquals('test', $index->retrieveRow(5));
52 $this->assertEquals('', $index->retrieveRow(10));
53 $index->save();
54 $full = file($index->getFilename(), FILE_IGNORE_NEW_LINES);
60 $index = $this->getIndex();
61 $this->assertFileDoesNotExist($index->getFilename());
62 $this->assertFalse($index->isDirty());
64 $index->changeRow(0, '');
65 $this->assertTrue($index->isDirty());
66 $index->save();
67 $this->assertFalse($index->isDirty());
68 $this->assertEquals(1, filesize($index->getFilename())); // new line
70 $index->changeRow(3, 'test');
71 $this->assertTrue($index->isDirty());
72 $index->save();
73 $this->assertFalse($index->isDirty());
74 $this->assertEquals(8, filesize($index->getFilename())); // 4 new lines + test
76 $index->getRowID('test'); // existing entry
77 $index->save();
78 $this->assertFalse($index->isDirty());