File tree 2 files changed +17
-1
lines changed
src/Symfony/Component/Lock
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class Factory implements LoggerAwareInterface
28
28
29
29
private $ store ;
30
30
31
- public function __construct (StoreInterface $ store )
31
+ public function __construct (PersistingStoreInterface $ store )
32
32
{
33
33
$ this ->store = $ store ;
34
34
Original file line number Diff line number Diff line change 15
15
use Psr \Log \LoggerInterface ;
16
16
use Symfony \Component \Lock \LockFactory ;
17
17
use Symfony \Component \Lock \LockInterface ;
18
+ use Symfony \Component \Lock \PersistingStoreInterface ;
18
19
use Symfony \Component \Lock \StoreInterface ;
19
20
20
21
/**
23
24
class LockFactoryTest extends TestCase
24
25
{
25
26
public function testCreateLock ()
27
+ {
28
+ $ store = $ this ->getMockBuilder (PersistingStoreInterface::class)->getMock ();
29
+ $ logger = $ this ->getMockBuilder (LoggerInterface::class)->getMock ();
30
+ $ factory = new LockFactory ($ store );
31
+ $ factory ->setLogger ($ logger );
32
+
33
+ $ lock = $ factory ->createLock ('foo ' );
34
+
35
+ $ this ->assertInstanceOf (LockInterface::class, $ lock );
36
+ }
37
+
38
+ /**
39
+ * @group legacy
40
+ */
41
+ public function testCreateLockWithLegacyStoreImplementation ()
26
42
{
27
43
$ store = $ this ->getMockBuilder (StoreInterface::class)->getMock ();
28
44
$ logger = $ this ->getMockBuilder (LoggerInterface::class)->getMock ();
You can’t perform that action at this time.
0 commit comments