@@ -45,11 +45,11 @@ protected function setUp(): void
4545 }
4646
4747 /**
48- * @param int $count The amount of redis apis
48+ * @param int $count The amount of redis APIs
4949 *
5050 * @return AbstractRedlockMutex<object>&MockObject
5151 */
52- private function createAbstractRedlockMutexMock (int $ count , float $ timeout = 1 ): AbstractRedlockMutex
52+ private function createRedlockMutexMock (int $ count , float $ timeout = 1 ): AbstractRedlockMutex
5353 {
5454 $ clients = array_map (
5555 static fn ($ id ) => ['id ' => $ id ],
@@ -76,7 +76,7 @@ public function testTooFewServerToAcquire(int $count, int $available): void
7676 $ this ->expectException (LockAcquireException::class);
7777 $ this ->expectExceptionCode (MutexException::REDIS_NOT_ENOUGH_SERVERS );
7878
79- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
79+ $ mutex = $ this ->createRedlockMutexMock ($ count );
8080
8181 $ i = 0 ;
8282 $ mutex ->expects (self ::exactly ($ count ))
@@ -109,7 +109,7 @@ static function () use (&$i, $available): bool {
109109 #[DataProvider('provideMajorityCases ' )]
110110 public function testFaultTolerance (int $ count , int $ available ): void
111111 {
112- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
112+ $ mutex = $ this ->createRedlockMutexMock ($ count );
113113 $ mutex ->expects (self ::exactly ($ count ))
114114 ->method ('evalScript ' )
115115 ->willReturn (true );
@@ -146,7 +146,7 @@ public function testAcquireTooFewKeys(int $count, int $available): void
146146 $ this ->expectException (TimeoutException::class);
147147 $ this ->expectExceptionMessage ('Timeout of 1.0 seconds exceeded ' );
148148
149- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
149+ $ mutex = $ this ->createRedlockMutexMock ($ count );
150150
151151 $ i = 0 ;
152152 $ mutex ->expects (self ::any ())
@@ -184,7 +184,7 @@ public function testTimingOut(int $count, float $timeout, float $delay): void
184184 $ this ->expectException (TimeoutException::class);
185185 $ this ->expectExceptionMessage ('Timeout of ' . $ timeoutStr . ' seconds exceeded ' );
186186
187- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count , $ timeout );
187+ $ mutex = $ this ->createRedlockMutexMock ($ count , $ timeout );
188188
189189 $ mutex ->expects (self ::exactly ($ count ))
190190 ->method ('add ' )
@@ -219,7 +219,7 @@ public static function provideTimingOutCases(): iterable
219219 #[DataProvider('provideMajorityCases ' )]
220220 public function testAcquireWithMajority (int $ count , int $ available ): void
221221 {
222- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
222+ $ mutex = $ this ->createRedlockMutexMock ($ count );
223223 $ mutex ->expects (self ::exactly ($ count ))
224224 ->method ('evalScript ' )
225225 ->willReturn (true );
@@ -249,7 +249,7 @@ static function () use (&$i, $available): bool {
249249 #[DataProvider('provideMinorityCases ' )]
250250 public function testTooFewServersToRelease (int $ count , int $ available ): void
251251 {
252- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
252+ $ mutex = $ this ->createRedlockMutexMock ($ count );
253253 $ mutex ->expects (self ::exactly ($ count ))
254254 ->method ('add ' )
255255 ->willReturn (true );
@@ -285,7 +285,7 @@ static function () use (&$i, $available): bool {
285285 #[DataProvider('provideMinorityCases ' )]
286286 public function testReleaseTooFewKeys (int $ count , int $ available ): void
287287 {
288- $ mutex = $ this ->createAbstractRedlockMutexMock ($ count );
288+ $ mutex = $ this ->createRedlockMutexMock ($ count );
289289 $ mutex ->expects (self ::exactly ($ count ))
290290 ->method ('add ' )
291291 ->willReturn (true );
0 commit comments