Skip to content

Commit

Permalink
chore: override test
Browse files Browse the repository at this point in the history
  • Loading branch information
pgautier404 committed Nov 17, 2023
1 parent bb5416e commit 7dd1a61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MomentoCacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public function setMultiple(array $items)
foreach ($futures as $future) {
$setResponse = $future->wait();
if ($setResponse->asError()) {
print("Error: " . $setResponse->asError()->message() . "\n");
$this->log(
"SET_MULTIPLE response error for bin $this->bin: " . $setResponse->asError()->message(),
true
Expand Down
7 changes: 7 additions & 0 deletions tests/src/Kernel/MomentoCacheBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public function tearDownCacheBackend() {
}
}

public function testSetMultiple() {
$backend = $this->getCacheBackend();
$backend->setMultiple(['test1' => ['data' => 1], 'test2' => ['data' => 2]]);
$this->assertEquals(1, $backend->get('test1'), 'Cache id test1 exists.');
$this->assertEquals(2, $backend->get('test2'), 'Cache id test2 exists.');
}

/**
* Creates a new instance of MomentoBackend.
*
Expand Down

0 comments on commit 7dd1a61

Please sign in to comment.