Skip to content

Commit 1f6ecef

Browse files
committed
fix tests
1 parent 0a439dc commit 1f6ecef

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Tests/Store/AbstractRedisStoreTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function getStore(): PersistingStoreInterface
3939

4040
public function testBackwardCompatibility()
4141
{
42-
$key1 = new Key(__METHOD__);
43-
$key2 = new Key(__METHOD__);
42+
$key1 = new Key(static::class.__METHOD__);
43+
$key2 = new Key(static::class.__METHOD__);
4444

4545
$oldStore = new Symfony51Store($this->getRedisConnection());
4646
$newStore = $this->getStore();

Tests/Store/AbstractStoreTestCase.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testSave()
2727
{
2828
$store = $this->getStore();
2929

30-
$key = new Key(__METHOD__);
30+
$key = new Key(static::class.__METHOD__);
3131

3232
$this->assertFalse($store->exists($key));
3333
$store->save($key);
@@ -40,8 +40,8 @@ public function testSaveWithDifferentResources()
4040
{
4141
$store = $this->getStore();
4242

43-
$key1 = new Key(__METHOD__.'1');
44-
$key2 = new Key(__METHOD__.'2');
43+
$key1 = new Key(static::class.__METHOD__.'1');
44+
$key2 = new Key(static::class.__METHOD__.'2');
4545

4646
$store->save($key1);
4747
$this->assertTrue($store->exists($key1));
@@ -64,8 +64,8 @@ public function testSaveWithDifferentKeysOnSameResources()
6464
{
6565
$store = $this->getStore();
6666

67-
$key1 = new Key(__METHOD__);
68-
$key2 = new Key(__METHOD__);
67+
$key1 = new Key(static::class.__METHOD__);
68+
$key2 = new Key(static::class.__METHOD__);
6969

7070
$store->save($key1);
7171
$this->assertTrue($store->exists($key1));
@@ -98,7 +98,7 @@ public function testSaveTwice()
9898
{
9999
$store = $this->getStore();
100100

101-
$key = new Key(__METHOD__);
101+
$key = new Key(static::class.__METHOD__);
102102

103103
$store->save($key);
104104
$store->save($key);
@@ -112,8 +112,8 @@ public function testDeleteIsolated()
112112
{
113113
$store = $this->getStore();
114114

115-
$key1 = new Key(__METHOD__.'1');
116-
$key2 = new Key(__METHOD__.'2');
115+
$key1 = new Key(static::class.__METHOD__.'1');
116+
$key2 = new Key(static::class.__METHOD__.'2');
117117

118118
$store->save($key1);
119119
$this->assertTrue($store->exists($key1));

Tests/Store/ExpiringStoreTestTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public function testSetExpiration()
106106

107107
public function testExpiredLockCleaned()
108108
{
109-
$key1 = new Key(__METHOD__);
110-
$key2 = new Key(__METHOD__);
109+
$key1 = new Key(static::class.__METHOD__);
110+
$key2 = new Key(static::class.__METHOD__);
111111

112112
/** @var PersistingStoreInterface $store */
113113
$store = $this->getStore();

Tests/Store/SharedLockStoreTestTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ public function testSharedLockPromoteAllowed()
132132
{
133133
$store = $this->getStore();
134134

135-
$key1 = new Key(__METHOD__);
136-
$key2 = new Key(__METHOD__);
135+
$key1 = new Key(static::class.__METHOD__);
136+
$key2 = new Key(static::class.__METHOD__);
137137

138138
$store->saveRead($key1);
139139
$store->save($key1);
@@ -156,8 +156,8 @@ public function testSharedLockDemote()
156156
{
157157
$store = $this->getStore();
158158

159-
$key1 = new Key(__METHOD__);
160-
$key2 = new Key(__METHOD__);
159+
$key1 = new Key(static::class.__METHOD__);
160+
$key2 = new Key(static::class.__METHOD__);
161161

162162
$store->save($key1);
163163
$store->saveRead($key1);

0 commit comments

Comments
 (0)