[Lock] Fix tests
This commit is contained in:
parent
29654a4c02
commit
2c5089b235
@ -27,7 +27,7 @@ use Symfony\Component\Lock\Strategy\StrategyInterface;
|
||||
*
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class CombinedStore implements StoreInterface, PersistStoreInterface, LoggerAwareInterface
|
||||
class CombinedStore implements StoreInterface, LoggerAwareInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use ExpiringStoreTrait;
|
||||
|
@ -16,7 +16,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Exception\LockStorageException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -29,7 +28,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
* @author Romain Neutron <imprec@gmail.com>
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
class FlockStore implements StoreInterface, BlockingStoreInterface, PersistStoreInterface
|
||||
class FlockStore implements StoreInterface, BlockingStoreInterface
|
||||
{
|
||||
private $lockPath;
|
||||
|
||||
|
@ -15,7 +15,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Lock\Exception\InvalidTtlException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -23,7 +22,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
*
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class MemcachedStore implements StoreInterface, PersistStoreInterface
|
||||
class MemcachedStore implements StoreInterface
|
||||
{
|
||||
use ExpiringStoreTrait;
|
||||
|
||||
|
@ -19,7 +19,6 @@ use Symfony\Component\Lock\Exception\InvalidTtlException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Exception\NotSupportedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -35,7 +34,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
*
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class PdoStore implements StoreInterface, PersistStoreInterface
|
||||
class PdoStore implements StoreInterface
|
||||
{
|
||||
use ExpiringStoreTrait;
|
||||
|
||||
|
@ -17,7 +17,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Lock\Exception\InvalidTtlException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -25,7 +24,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
*
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class RedisStore implements StoreInterface, PersistStoreInterface
|
||||
class RedisStore implements StoreInterface
|
||||
{
|
||||
use ExpiringStoreTrait;
|
||||
|
||||
|
@ -15,7 +15,6 @@ use Symfony\Component\Lock\BlockingStoreInterface;
|
||||
use Symfony\Component\Lock\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -23,7 +22,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
*
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class SemaphoreStore implements StoreInterface, PersistStoreInterface, BlockingStoreInterface
|
||||
class SemaphoreStore implements StoreInterface, BlockingStoreInterface
|
||||
{
|
||||
/**
|
||||
* Returns whether or not the store is supported.
|
||||
|
@ -16,7 +16,6 @@ use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Exception\LockReleasingException;
|
||||
use Symfony\Component\Lock\Exception\NotSupportedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
/**
|
||||
@ -24,7 +23,7 @@ use Symfony\Component\Lock\StoreInterface;
|
||||
*
|
||||
* @author Ganesh Chandrasekaran <gchandrasekaran@wayfair.com>
|
||||
*/
|
||||
class ZookeeperStore implements StoreInterface, PersistStoreInterface
|
||||
class ZookeeperStore implements StoreInterface
|
||||
{
|
||||
use ExpiringStoreTrait;
|
||||
|
||||
|
@ -17,6 +17,7 @@ use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\PersistStoreInterface;
|
||||
use Symfony\Component\Lock\Store\CombinedStore;
|
||||
use Symfony\Component\Lock\Store\RedisStore;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
use Symfony\Component\Lock\Strategy\StrategyInterface;
|
||||
use Symfony\Component\Lock\Strategy\UnanimousStrategy;
|
||||
|
||||
@ -267,8 +268,8 @@ class CombinedStoreTest extends AbstractStoreTest
|
||||
|
||||
public function testPutOffExpirationIgnoreNonExpiringStorage()
|
||||
{
|
||||
$store1 = $this->getMockBuilder([PersistStoreInterface::class, BlockingStoreInterface::class])->getMock();
|
||||
$store2 = $this->getMockBuilder([PersistStoreInterface::class, BlockingStoreInterface::class])->getMock();
|
||||
$store1 = $this->getMockBuilder(StoreInterface::class)->getMock();
|
||||
$store2 = $this->getMockBuilder(StoreInterface::class)->getMock();
|
||||
|
||||
$store = new CombinedStore([$store1, $store2], $this->strategy);
|
||||
|
||||
|
Reference in New Issue
Block a user