Skip to content

Commit 1e57da9

Browse files
committed
Adds a test for fetching many with associative arrays
1 parent cf2b977 commit 1e57da9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Integration/Database/DatabaseCacheStoreTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,23 @@ public function testManyWithExpiredKeys()
200200
$this->assertDatabaseMissing($this->getCacheTableName(), ['key' => $this->withCachePrefix('first')]);
201201
}
202202

203+
public function testManyAsAssociativeArray()
204+
{
205+
$this->insertToCacheTable('first', 'cached', 60);
206+
207+
$result = $this->getStore()->many([
208+
'first' => 'aa',
209+
'second' => 'bb',
210+
'third',
211+
]);
212+
213+
$this->assertEquals([
214+
'first' => 'cached',
215+
'second' => 'bb',
216+
'third' => null,
217+
], $result);
218+
}
219+
203220
public function testPutMany()
204221
{
205222
$store = $this->getStore();

0 commit comments

Comments
 (0)