[Lock] Fix tests

This commit is contained in:
Amrouche Hamza 2019-07-08 15:59:16 +02:00
parent 29654a4c02
commit 2c5089b235
No known key found for this signature in database
GPG Key ID: E45A3DA456145BC1
8 changed files with 10 additions and 15 deletions

View File

@ -27,7 +27,7 @@ use Symfony\Component\Lock\Strategy\StrategyInterface;
* *
* @author Jérémy Derussé <jeremy@derusse.com> * @author Jérémy Derussé <jeremy@derusse.com>
*/ */
class CombinedStore implements StoreInterface, PersistStoreInterface, LoggerAwareInterface class CombinedStore implements StoreInterface, LoggerAwareInterface
{ {
use LoggerAwareTrait; use LoggerAwareTrait;
use ExpiringStoreTrait; use ExpiringStoreTrait;

View File

@ -16,7 +16,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Exception\LockStorageException; use Symfony\Component\Lock\Exception\LockStorageException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -29,7 +28,7 @@ use Symfony\Component\Lock\StoreInterface;
* @author Romain Neutron <imprec@gmail.com> * @author Romain Neutron <imprec@gmail.com>
* @author Nicolas Grekas <p@tchwork.com> * @author Nicolas Grekas <p@tchwork.com>
*/ */
class FlockStore implements StoreInterface, BlockingStoreInterface, PersistStoreInterface class FlockStore implements StoreInterface, BlockingStoreInterface
{ {
private $lockPath; private $lockPath;

View File

@ -15,7 +15,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\InvalidTtlException;
use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -23,7 +22,7 @@ use Symfony\Component\Lock\StoreInterface;
* *
* @author Jérémy Derussé <jeremy@derusse.com> * @author Jérémy Derussé <jeremy@derusse.com>
*/ */
class MemcachedStore implements StoreInterface, PersistStoreInterface class MemcachedStore implements StoreInterface
{ {
use ExpiringStoreTrait; use ExpiringStoreTrait;

View File

@ -19,7 +19,6 @@ use Symfony\Component\Lock\Exception\InvalidTtlException;
use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Exception\NotSupportedException; use Symfony\Component\Lock\Exception\NotSupportedException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -35,7 +34,7 @@ use Symfony\Component\Lock\StoreInterface;
* *
* @author Jérémy Derussé <jeremy@derusse.com> * @author Jérémy Derussé <jeremy@derusse.com>
*/ */
class PdoStore implements StoreInterface, PersistStoreInterface class PdoStore implements StoreInterface
{ {
use ExpiringStoreTrait; use ExpiringStoreTrait;

View File

@ -17,7 +17,6 @@ use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\InvalidTtlException;
use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -25,7 +24,7 @@ use Symfony\Component\Lock\StoreInterface;
* *
* @author Jérémy Derussé <jeremy@derusse.com> * @author Jérémy Derussé <jeremy@derusse.com>
*/ */
class RedisStore implements StoreInterface, PersistStoreInterface class RedisStore implements StoreInterface
{ {
use ExpiringStoreTrait; use ExpiringStoreTrait;

View File

@ -15,7 +15,6 @@ use Symfony\Component\Lock\BlockingStoreInterface;
use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -23,7 +22,7 @@ use Symfony\Component\Lock\StoreInterface;
* *
* @author Jérémy Derussé <jeremy@derusse.com> * @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. * Returns whether or not the store is supported.

View File

@ -16,7 +16,6 @@ use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Exception\LockReleasingException; use Symfony\Component\Lock\Exception\LockReleasingException;
use Symfony\Component\Lock\Exception\NotSupportedException; use Symfony\Component\Lock\Exception\NotSupportedException;
use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Lock\StoreInterface;
/** /**
@ -24,7 +23,7 @@ use Symfony\Component\Lock\StoreInterface;
* *
* @author Ganesh Chandrasekaran <gchandrasekaran@wayfair.com> * @author Ganesh Chandrasekaran <gchandrasekaran@wayfair.com>
*/ */
class ZookeeperStore implements StoreInterface, PersistStoreInterface class ZookeeperStore implements StoreInterface
{ {
use ExpiringStoreTrait; use ExpiringStoreTrait;

View File

@ -17,6 +17,7 @@ use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistStoreInterface; use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\Store\CombinedStore; use Symfony\Component\Lock\Store\CombinedStore;
use Symfony\Component\Lock\Store\RedisStore; use Symfony\Component\Lock\Store\RedisStore;
use Symfony\Component\Lock\StoreInterface;
use Symfony\Component\Lock\Strategy\StrategyInterface; use Symfony\Component\Lock\Strategy\StrategyInterface;
use Symfony\Component\Lock\Strategy\UnanimousStrategy; use Symfony\Component\Lock\Strategy\UnanimousStrategy;
@ -267,8 +268,8 @@ class CombinedStoreTest extends AbstractStoreTest
public function testPutOffExpirationIgnoreNonExpiringStorage() public function testPutOffExpirationIgnoreNonExpiringStorage()
{ {
$store1 = $this->getMockBuilder([PersistStoreInterface::class, BlockingStoreInterface::class])->getMock(); $store1 = $this->getMockBuilder(StoreInterface::class)->getMock();
$store2 = $this->getMockBuilder([PersistStoreInterface::class, BlockingStoreInterface::class])->getMock(); $store2 = $this->getMockBuilder(StoreInterface::class)->getMock();
$store = new CombinedStore([$store1, $store2], $this->strategy); $store = new CombinedStore([$store1, $store2], $this->strategy);