public function testGettingMultipleKeysIsDelegatedToClient() { $items = ['key1' => 'foo', 'key2' => 'bar']; $keys = array_keys($items); $this->mockClient->expects($this->once())->method('mGet')->with($keys)->willReturn($items); $this->assertSame($items, $this->store->multiGet(...$keys)); }
public function testMissingValuesAreExcludedFromResultArray() { $items = ['key1' => 'foo', 'key2' => 'bar']; $keys = array_keys($items); $this->keyValueStore->multiSet($items); $keys[] = 'key3'; $result = $this->keyValueStore->multiGet(...$keys); $this->assertSame($items, $result); }