Skip to content

Commit

Permalink
Fixed cache tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Aug 16, 2019
1 parent 4c6c24f commit e14e4d7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Cache/CacheRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,16 @@ public function testPuttingMultipleItemsInCache()

public function testSettingMultipleItemsInCacheArray()
{
// Alias of PuttingMultiple
$repo = $this->getRepository();
$repo->getStore()->shouldReceive('putMany')->once()->with(['foo' => 'bar', 'bar' => 'baz'], 1);
$repo->setMultiple(['foo' => 'bar', 'bar' => 'baz'], 1);
$repo->setMultiple(['foo' => 'bar', 'bar' => 'baz'], 60);
}

public function testSettingMultipleItemsInCacheIterator()
{
// Alias of PuttingMultiple
$repo = $this->getRepository();
$repo->getStore()->shouldReceive('putMany')->once()->with(['foo' => 'bar', 'bar' => 'baz'], 1);
$repo->setMultiple(new ArrayIterator(['foo' => 'bar', 'bar' => 'baz']), 1);
$repo->setMultiple(new ArrayIterator(['foo' => 'bar', 'bar' => 'baz']), 60);
}

public function testPutWithDatetimeInPastOrZeroSecondsDoesntSaveItem()
Expand Down Expand Up @@ -210,7 +208,7 @@ public function testSettingCache()
{
$repo = $this->getRepository();
$repo->getStore()->shouldReceive('put')->with($key = 'foo', $value = 'bar', 1);
$repo->set($key, $value, 1);
$repo->set($key, $value, 60);
}

public function testClearingWholeCache()
Expand Down

0 comments on commit e14e4d7

Please sign in to comment.