Skip to content

Commit 0ed512b

Browse files
OskarStarknicolas-grekas
authored andcommitted
Migrate to static data providers using rector/rector
1 parent 30c8b42 commit 0ed512b

9 files changed

+14
-14
lines changed

Tests/LockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function testExpirationStoreInterface($ttls, $expected)
404404
$this->assertSame($expected, $lock->isExpired());
405405
}
406406

407-
public function provideExpiredDates()
407+
public static function provideExpiredDates()
408408
{
409409
yield [[-0.1], true];
410410
yield [[0.1, -0.1], true];

Tests/Store/DoctrineDbalPostgreSqlStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testInvalidDriver($connOrDsn)
6363
$store->exists(new Key('foo'));
6464
}
6565

66-
public function getInvalidDrivers()
66+
public static function getInvalidDrivers()
6767
{
6868
yield ['sqlite:///tmp/foo.db'];
6969
yield [DriverManager::getConnection(['url' => 'sqlite:///tmp/foo.db'])];

Tests/Store/DoctrineDbalStoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testDsn(string $dsn, string $file = null)
8585
}
8686
}
8787

88-
public function provideDsn()
88+
public static function provideDsn()
8989
{
9090
$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
9191
yield ['sqlite://localhost/'.$dbFile.'1', $dbFile.'1'];
@@ -133,7 +133,7 @@ public function testCreatesTableInTransaction(string $platform)
133133
$store->save($key);
134134
}
135135

136-
public function providePlatforms()
136+
public static function providePlatforms()
137137
{
138138
yield [\Doctrine\DBAL\Platforms\PostgreSQLPlatform::class];
139139
yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class];

Tests/Store/MongoDbStoreTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testConstructionMethods($mongo, array $options)
9797
$this->assertFalse($store->exists($key));
9898
}
9999

100-
public function provideConstructorArgs()
100+
public static function provideConstructorArgs()
101101
{
102102
$client = self::getMongoClient();
103103
yield [$client, ['database' => 'test', 'collection' => 'lock']];
@@ -138,7 +138,7 @@ public function testInvalidConstructionMethods($mongo, array $options)
138138
new MongoDbStore($mongo, $options);
139139
}
140140

141-
public function provideInvalidConstructorArgs()
141+
public static function provideInvalidConstructorArgs()
142142
{
143143
$client = self::getMongoClient();
144144
yield [$client, ['collection' => 'lock']];
@@ -165,7 +165,7 @@ public function testUriCollectionStrip(string $uri, array $options, string $driv
165165
$this->assertSame($driverUri, $uri);
166166
}
167167

168-
public function provideUriCollectionStripArgs()
168+
public static function provideUriCollectionStripArgs()
169169
{
170170
yield ['mongodb://localhost/?collection=lock', ['database' => 'test'], 'mongodb://localhost/'];
171171
yield ['mongodb://localhost/', ['database' => 'test', 'collection' => 'lock'], 'mongodb://localhost/'];

Tests/Store/PdoDbalStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testDsn(string $dsn, string $file = null)
9999
}
100100
}
101101

102-
public function provideDsn()
102+
public static function provideDsn()
103103
{
104104
$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
105105
yield ['sqlite://localhost/'.$dbFile.'1', $dbFile.'1'];

Tests/Store/PdoStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testDsn(string $dsn, string $file = null)
9595
}
9696
}
9797

98-
public function provideDsn()
98+
public static function provideDsn()
9999
{
100100
$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
101101
yield ['sqlite:'.$dbFile.'2', $dbFile.'2'];

Tests/Store/ZookeeperStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testCreateConnection(string $connectionString)
4646
$this->assertInstanceOf(\Zookeeper::class, ZookeeperStore::createConnection($connectionString));
4747
}
4848

49-
public function provideValidConnectionString(): iterable
49+
public static function provideValidConnectionString(): iterable
5050
{
5151
yield 'single host' => ['zookeeper://localhost:2181'];
5252
yield 'single multiple host' => ['zookeeper://localhost:2181,localhost:2181'];

Tests/Strategy/ConsensusStrategyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function setUp(): void
2727
$this->strategy = new ConsensusStrategy();
2828
}
2929

30-
public function provideMetResults()
30+
public static function provideMetResults()
3131
{
3232
// success, failure, total, isMet
3333
yield [3, 0, 3, true];
@@ -49,7 +49,7 @@ public function provideMetResults()
4949
yield [0, 0, 2, false];
5050
}
5151

52-
public function provideIndeterminate()
52+
public static function provideIndeterminate()
5353
{
5454
// success, failure, total, canBeMet
5555
yield [3, 0, 3, true];

Tests/Strategy/UnanimousStrategyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function setUp(): void
2727
$this->strategy = new UnanimousStrategy();
2828
}
2929

30-
public function provideMetResults()
30+
public static function provideMetResults()
3131
{
3232
// success, failure, total, isMet
3333
yield [3, 0, 3, true];
@@ -49,7 +49,7 @@ public function provideMetResults()
4949
yield [0, 0, 2, false];
5050
}
5151

52-
public function provideIndeterminate()
52+
public static function provideIndeterminate()
5353
{
5454
// success, failure, total, canBeMet
5555
yield [3, 0, 3, true];

0 commit comments

Comments
 (0)