Skip to content

Commit

Permalink
lock() and unlock() for CacheFile returns true.
Browse files Browse the repository at this point in the history
  • Loading branch information
romeOz committed Oct 12, 2015
1 parent 4334eed commit f4a4082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/CacheFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ public function getAll()
*/
public function lock($key, $iteration = 15)
{
throw new CacheException(CacheException::UNKNOWN_METHOD, ['method' => __METHOD__]);
return true;
}

/**
* @inheritdoc
*/
public function unlock($key)
{
throw new CacheException(CacheException::UNKNOWN_METHOD, ['method' => __METHOD__]);
return true;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/CacheFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public function testGetAllKeys(CacheInterface $cache)

/**
* @dataProvider providerCache
* @expectedException \rock\cache\CacheException
*/
public function testLockAndUnlock(CacheInterface $cache)
{
$cache->lock('key1');
$this->assertTrue($cache->lock('key1'));
$this->assertTrue($cache->unlock('key1'));
}

/**
Expand Down

0 comments on commit f4a4082

Please sign in to comment.