18
18
use Symfony \Component \Lock \Key ;
19
19
use Symfony \Component \Lock \Lock ;
20
20
use Symfony \Component \Lock \PersistStoreInterface ;
21
- use Symfony \Component \Lock \StoreInterface ;
22
21
23
22
/**
24
23
* @author Jérémy Derussé <jeremy@derusse.com>
@@ -41,7 +40,7 @@ public function testAcquireNoBlocking()
41
40
public function testAcquireNoBlockingStoreInterface ()
42
41
{
43
42
$ key = new Key (uniqid (__METHOD__ , true ));
44
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
43
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
45
44
$ lock = new Lock ($ key , $ store );
46
45
47
46
$ store
@@ -59,7 +58,7 @@ public function testAcquireNoBlockingStoreInterface()
59
58
public function testPassingOldStoreInterface ()
60
59
{
61
60
$ key = new Key (uniqid (__METHOD__ , true ));
62
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
61
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
63
62
$ lock = new Lock ($ key , $ store );
64
63
65
64
$ store
@@ -86,7 +85,7 @@ public function testAcquireReturnsFalse()
86
85
public function testAcquireReturnsFalseStoreInterface ()
87
86
{
88
87
$ key = new Key (uniqid (__METHOD__ , true ));
89
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
88
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
90
89
$ lock = new Lock ($ key , $ store );
91
90
92
91
$ store
@@ -121,7 +120,7 @@ public function testAcquireBlocking()
121
120
public function testAcquireSetsTtl ()
122
121
{
123
122
$ key = new Key (uniqid (__METHOD__ , true ));
124
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
123
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
125
124
$ lock = new Lock ($ key , $ store , 10 );
126
125
127
126
$ store
@@ -138,7 +137,7 @@ public function testAcquireSetsTtl()
138
137
public function testRefresh ()
139
138
{
140
139
$ key = new Key (uniqid (__METHOD__ , true ));
141
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
140
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
142
141
$ lock = new Lock ($ key , $ store , 10 );
143
142
144
143
$ store
@@ -152,7 +151,7 @@ public function testRefresh()
152
151
public function testRefreshCustom ()
153
152
{
154
153
$ key = new Key (uniqid (__METHOD__ , true ));
155
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
154
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
156
155
$ lock = new Lock ($ key , $ store , 10 );
157
156
158
157
$ store
@@ -201,7 +200,7 @@ public function testRelease()
201
200
public function testReleaseStoreInterface ()
202
201
{
203
202
$ key = new Key (uniqid (__METHOD__ , true ));
204
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
203
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
205
204
$ lock = new Lock ($ key , $ store , 10 );
206
205
207
206
$ store
@@ -356,7 +355,7 @@ public function testExpiration($ttls, $expected)
356
355
public function testExpirationStoreInterface ($ ttls , $ expected )
357
356
{
358
357
$ key = new Key (uniqid (__METHOD__ , true ));
359
- $ store = $ this ->getMockBuilder (StoreInterface ::class)->getMock ();
358
+ $ store = $ this ->getMockBuilder (PersistStoreInterface ::class)->getMock ();
360
359
$ lock = new Lock ($ key , $ store , 10 );
361
360
362
361
foreach ($ ttls as $ ttl ) {
0 commit comments