Skip to content
Snippets Groups Projects
Commit ec2d7cff authored by Vincent Petry's avatar Vincent Petry
Browse files

SQLite autoincrement test

parent c6494034
No related merge requests found
...@@ -594,6 +594,19 @@ class Cache extends \Test\TestCase { ...@@ -594,6 +594,19 @@ class Cache extends \Test\TestCase {
$this->assertEquals($newData, $newDataFromBogus); $this->assertEquals($newData, $newDataFromBogus);
} }
public function testNoReuseOfFileId() {
$data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain');
$this->cache->put('somefile.txt', $data1);
$info = $this->cache->get('somefile.txt');
$fileId = $info['fileid'];
$this->cache->remove('somefile.txt');
$data2 = array('size' => 200, 'mtime' => 100, 'mimetype' => 'text/plain');
$this->cache->put('anotherfile.txt', $data2);
$info2 = $this->cache->get('anotherfile.txt');
$fileId2 = $info2['fileid'];
$this->assertNotEquals($fileId, $fileId2);
}
protected function tearDown() { protected function tearDown() {
if ($this->cache) { if ($this->cache) {
$this->cache->clear(); $this->cache->clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment