Skip to content

Commit 68e2624

Browse files
More cleanups and fixes
1 parent 643f590 commit 68e2624

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/LockFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testCreateLock()
5454

5555
public function testCreateLockFromKey()
5656
{
57-
$store = $this->getMockBuilder(PersistingStoreInterface::class)->getMock();
57+
$store = $this->createMock(PersistingStoreInterface::class);
5858
$store->expects($this->any())->method('exists')->willReturn(false);
5959

6060
$keys = [];
@@ -68,7 +68,7 @@ public function testCreateLockFromKey()
6868
}))
6969
->willReturn(true);
7070

71-
$logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
71+
$logger = $this->createMock(LoggerInterface::class);
7272
$factory = new LockFactory($store);
7373
$factory->setLogger($logger);
7474

Tests/LockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
6363
public function testAcquireBlockingWithPersistingStoreInterface()
6464
{
6565
$key = new Key(uniqid(__METHOD__, true));
66-
$store = $this->getMockBuilder(PersistingStoreInterface::class)->getMock();
66+
$store = $this->createMock(PersistingStoreInterface::class);
6767
$lock = new Lock($key, $store);
6868

6969
$store
@@ -79,7 +79,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
7979
public function testAcquireBlockingRetryWithPersistingStoreInterface()
8080
{
8181
$key = new Key(uniqid(__METHOD__, true));
82-
$store = $this->getMockBuilder(PersistingStoreInterface::class)->getMock();
82+
$store = $this->createMock(PersistingStoreInterface::class);
8383
$lock = new Lock($key, $store);
8484

8585
$store

0 commit comments

Comments
 (0)