Skip to content

Commit 82b6c62

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents fff087d + e75960b commit 82b6c62

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Diff for: Tests/FilesystemTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ public function testMakePathRelative($endPath, $startPath, $expectedPath)
11421142
$this->assertEquals($expectedPath, $path);
11431143
}
11441144

1145-
public function providePathsForMakePathRelative()
1145+
public static function providePathsForMakePathRelative()
11461146
{
11471147
$paths = [
11481148
['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'],
@@ -1430,7 +1430,7 @@ public function testIsAbsolutePath($path, $expectedResult)
14301430
$this->assertEquals($expectedResult, $result);
14311431
}
14321432

1433-
public function providePathsForIsAbsolutePath()
1433+
public static function providePathsForIsAbsolutePath()
14341434
{
14351435
return [
14361436
['/var/lib', true],

Diff for: Tests/PathTest.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function tearDown(): void
4141
putenv('HOMEPATH='.$this->storedEnv['HOMEPATH']);
4242
}
4343

44-
public function provideCanonicalizationTests(): \Generator
44+
public static function provideCanonicalizationTests(): \Generator
4545
{
4646
// relative paths (forward slash)
4747
yield ['css/./style.css', 'css/style.css'];
@@ -172,7 +172,7 @@ public function testCanonicalize(string $path, string $canonicalized)
172172
$this->assertSame($canonicalized, Path::canonicalize($path));
173173
}
174174

175-
public function provideGetDirectoryTests(): \Generator
175+
public static function provideGetDirectoryTests(): \Generator
176176
{
177177
yield ['/webmozart/symfony/style.css', '/webmozart/symfony'];
178178
yield ['/webmozart/symfony', '/webmozart'];
@@ -235,7 +235,7 @@ public function testGetDirectory(string $path, string $directory)
235235
$this->assertSame($directory, Path::getDirectory($path));
236236
}
237237

238-
public function provideGetFilenameWithoutExtensionTests(): \Generator
238+
public static function provideGetFilenameWithoutExtensionTests(): \Generator
239239
{
240240
yield ['/webmozart/symfony/style.css.twig', null, 'style.css'];
241241
yield ['/webmozart/symfony/style.css.', null, 'style.css'];
@@ -266,7 +266,7 @@ public function testGetFilenameWithoutExtension(string $path, ?string $extension
266266
$this->assertSame($filename, Path::getFilenameWithoutExtension($path, $extension));
267267
}
268268

269-
public function provideGetExtensionTests(): \Generator
269+
public static function provideGetExtensionTests(): \Generator
270270
{
271271
yield ['/webmozart/symfony/style.css.twig', false, 'twig'];
272272
yield ['/webmozart/symfony/style.css', false, 'css'];
@@ -291,7 +291,7 @@ public function testGetExtension(string $path, bool $forceLowerCase, string $ext
291291
$this->assertSame($extension, Path::getExtension($path, $forceLowerCase));
292292
}
293293

294-
public function provideHasExtensionTests(): \Generator
294+
public static function provideHasExtensionTests(): \Generator
295295
{
296296
yield [true, '/webmozart/symfony/style.css.twig', null, false];
297297
yield [true, '/webmozart/symfony/style.css', null, false];
@@ -338,7 +338,7 @@ public function testHasExtension(bool $hasExtension, string $path, $extension, b
338338
$this->assertSame($hasExtension, Path::hasExtension($path, $extension, $ignoreCase));
339339
}
340340

341-
public function provideChangeExtensionTests(): \Generator
341+
public static function provideChangeExtensionTests(): \Generator
342342
{
343343
yield ['/webmozart/symfony/style.css.twig', 'html', '/webmozart/symfony/style.css.html'];
344344
yield ['/webmozart/symfony/style.css', 'sass', '/webmozart/symfony/style.sass'];
@@ -362,7 +362,7 @@ public function testChangeExtension(string $path, string $extension, string $pat
362362
$this->assertSame($pathExpected, Path::changeExtension($path, $extension));
363363
}
364364

365-
public function provideIsAbsolutePathTests(): \Generator
365+
public static function provideIsAbsolutePathTests(): \Generator
366366
{
367367
yield ['/css/style.css', true];
368368
yield ['/', true];
@@ -405,7 +405,7 @@ public function testIsRelative(string $path, bool $isAbsolute)
405405
$this->assertSame(!$isAbsolute, Path::isRelative($path));
406406
}
407407

408-
public function provideGetRootTests(): \Generator
408+
public static function provideGetRootTests(): \Generator
409409
{
410410
yield ['/css/style.css', '/'];
411411
yield ['/', '/'];
@@ -460,7 +460,7 @@ private static function getPathTests(): \Generator
460460
];
461461
}
462462

463-
public function provideMakeAbsoluteTests(): \Generator
463+
public static function provideMakeAbsoluteTests(): \Generator
464464
{
465465
yield from self::getPathTests();
466466

@@ -551,7 +551,7 @@ public function testMakeAbsoluteFailsIfBasePathEmpty()
551551
Path::makeAbsolute('css/style.css', '');
552552
}
553553

554-
public function provideAbsolutePathsWithDifferentRoots(): \Generator
554+
public static function provideAbsolutePathsWithDifferentRoots(): \Generator
555555
{
556556
yield ['C:/css/style.css', '/webmozart/symfony'];
557557
yield ['C:/css/style.css', '\\webmozart\\symfony'];
@@ -587,7 +587,7 @@ public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, str
587587
$this->assertSame(Path::canonicalize($absolutePath), Path::makeAbsolute($absolutePath, $basePath));
588588
}
589589

590-
public function provideMakeRelativeTests(): \Generator
590+
public static function provideMakeRelativeTests(): \Generator
591591
{
592592
foreach (self::getPathTests() as $set) {
593593
yield [$set[2], $set[1], $set[0]];
@@ -713,7 +713,7 @@ public function testMakeRelativeFailsIfDifferentRoot(string $absolutePath, strin
713713
Path::makeRelative($absolutePath, $basePath);
714714
}
715715

716-
public function provideIsLocalTests(): \Generator
716+
public static function provideIsLocalTests(): \Generator
717717
{
718718
yield ['/bg.png', true];
719719
yield ['bg.png', true];
@@ -730,7 +730,7 @@ public function testIsLocal(string $path, bool $isLocal)
730730
$this->assertSame($isLocal, Path::isLocal($path));
731731
}
732732

733-
public function provideGetLongestCommonBasePathTests(): \Generator
733+
public static function provideGetLongestCommonBasePathTests(): \Generator
734734
{
735735
// same paths
736736
yield [['/base/path', '/base/path'], '/base/path'];
@@ -850,7 +850,7 @@ public function testGetLongestCommonBasePath(array $paths, ?string $basePath)
850850
$this->assertSame($basePath, Path::getLongestCommonBasePath(...$paths));
851851
}
852852

853-
public function provideIsBasePathTests(): \Generator
853+
public static function provideIsBasePathTests(): \Generator
854854
{
855855
// same paths
856856
yield ['/base/path', '/base/path', true];
@@ -939,7 +939,7 @@ public function testIsBasePath(string $path, string $ofPath, bool $result)
939939
$this->assertSame($result, Path::isBasePath($path, $ofPath));
940940
}
941941

942-
public function provideJoinTests(): \Generator
942+
public static function provideJoinTests(): \Generator
943943
{
944944
yield [['', ''], ''];
945945
yield [['/path/to/test', ''], '/path/to/test'];

0 commit comments

Comments
 (0)