@@ -41,7 +41,7 @@ protected function tearDown(): void
41
41
putenv ('HOMEPATH= ' .$ this ->storedEnv ['HOMEPATH ' ]);
42
42
}
43
43
44
- public function provideCanonicalizationTests (): \Generator
44
+ public static function provideCanonicalizationTests (): \Generator
45
45
{
46
46
// relative paths (forward slash)
47
47
yield ['css/./style.css ' , 'css/style.css ' ];
@@ -172,7 +172,7 @@ public function testCanonicalize(string $path, string $canonicalized)
172
172
$ this ->assertSame ($ canonicalized , Path::canonicalize ($ path ));
173
173
}
174
174
175
- public function provideGetDirectoryTests (): \Generator
175
+ public static function provideGetDirectoryTests (): \Generator
176
176
{
177
177
yield ['/webmozart/symfony/style.css ' , '/webmozart/symfony ' ];
178
178
yield ['/webmozart/symfony ' , '/webmozart ' ];
@@ -235,7 +235,7 @@ public function testGetDirectory(string $path, string $directory)
235
235
$ this ->assertSame ($ directory , Path::getDirectory ($ path ));
236
236
}
237
237
238
- public function provideGetFilenameWithoutExtensionTests (): \Generator
238
+ public static function provideGetFilenameWithoutExtensionTests (): \Generator
239
239
{
240
240
yield ['/webmozart/symfony/style.css.twig ' , null , 'style.css ' ];
241
241
yield ['/webmozart/symfony/style.css. ' , null , 'style.css ' ];
@@ -266,7 +266,7 @@ public function testGetFilenameWithoutExtension(string $path, ?string $extension
266
266
$ this ->assertSame ($ filename , Path::getFilenameWithoutExtension ($ path , $ extension ));
267
267
}
268
268
269
- public function provideGetExtensionTests (): \Generator
269
+ public static function provideGetExtensionTests (): \Generator
270
270
{
271
271
yield ['/webmozart/symfony/style.css.twig ' , false , 'twig ' ];
272
272
yield ['/webmozart/symfony/style.css ' , false , 'css ' ];
@@ -291,7 +291,7 @@ public function testGetExtension(string $path, bool $forceLowerCase, string $ext
291
291
$ this ->assertSame ($ extension , Path::getExtension ($ path , $ forceLowerCase ));
292
292
}
293
293
294
- public function provideHasExtensionTests (): \Generator
294
+ public static function provideHasExtensionTests (): \Generator
295
295
{
296
296
yield [true , '/webmozart/symfony/style.css.twig ' , null , false ];
297
297
yield [true , '/webmozart/symfony/style.css ' , null , false ];
@@ -338,7 +338,7 @@ public function testHasExtension(bool $hasExtension, string $path, $extension, b
338
338
$ this ->assertSame ($ hasExtension , Path::hasExtension ($ path , $ extension , $ ignoreCase ));
339
339
}
340
340
341
- public function provideChangeExtensionTests (): \Generator
341
+ public static function provideChangeExtensionTests (): \Generator
342
342
{
343
343
yield ['/webmozart/symfony/style.css.twig ' , 'html ' , '/webmozart/symfony/style.css.html ' ];
344
344
yield ['/webmozart/symfony/style.css ' , 'sass ' , '/webmozart/symfony/style.sass ' ];
@@ -362,7 +362,7 @@ public function testChangeExtension(string $path, string $extension, string $pat
362
362
$ this ->assertSame ($ pathExpected , Path::changeExtension ($ path , $ extension ));
363
363
}
364
364
365
- public function provideIsAbsolutePathTests (): \Generator
365
+ public static function provideIsAbsolutePathTests (): \Generator
366
366
{
367
367
yield ['/css/style.css ' , true ];
368
368
yield ['/ ' , true ];
@@ -405,7 +405,7 @@ public function testIsRelative(string $path, bool $isAbsolute)
405
405
$ this ->assertSame (!$ isAbsolute , Path::isRelative ($ path ));
406
406
}
407
407
408
- public function provideGetRootTests (): \Generator
408
+ public static function provideGetRootTests (): \Generator
409
409
{
410
410
yield ['/css/style.css ' , '/ ' ];
411
411
yield ['/ ' , '/ ' ];
@@ -460,7 +460,7 @@ private static function getPathTests(): \Generator
460
460
];
461
461
}
462
462
463
- public function provideMakeAbsoluteTests (): \Generator
463
+ public static function provideMakeAbsoluteTests (): \Generator
464
464
{
465
465
yield from self ::getPathTests ();
466
466
@@ -551,7 +551,7 @@ public function testMakeAbsoluteFailsIfBasePathEmpty()
551
551
Path::makeAbsolute ('css/style.css ' , '' );
552
552
}
553
553
554
- public function provideAbsolutePathsWithDifferentRoots (): \Generator
554
+ public static function provideAbsolutePathsWithDifferentRoots (): \Generator
555
555
{
556
556
yield ['C:/css/style.css ' , '/webmozart/symfony ' ];
557
557
yield ['C:/css/style.css ' , '\\webmozart \\symfony ' ];
@@ -587,7 +587,7 @@ public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, str
587
587
$ this ->assertSame (Path::canonicalize ($ absolutePath ), Path::makeAbsolute ($ absolutePath , $ basePath ));
588
588
}
589
589
590
- public function provideMakeRelativeTests (): \Generator
590
+ public static function provideMakeRelativeTests (): \Generator
591
591
{
592
592
foreach (self ::getPathTests () as $ set ) {
593
593
yield [$ set [2 ], $ set [1 ], $ set [0 ]];
@@ -713,7 +713,7 @@ public function testMakeRelativeFailsIfDifferentRoot(string $absolutePath, strin
713
713
Path::makeRelative ($ absolutePath , $ basePath );
714
714
}
715
715
716
- public function provideIsLocalTests (): \Generator
716
+ public static function provideIsLocalTests (): \Generator
717
717
{
718
718
yield ['/bg.png ' , true ];
719
719
yield ['bg.png ' , true ];
@@ -730,7 +730,7 @@ public function testIsLocal(string $path, bool $isLocal)
730
730
$ this ->assertSame ($ isLocal , Path::isLocal ($ path ));
731
731
}
732
732
733
- public function provideGetLongestCommonBasePathTests (): \Generator
733
+ public static function provideGetLongestCommonBasePathTests (): \Generator
734
734
{
735
735
// same paths
736
736
yield [['/base/path ' , '/base/path ' ], '/base/path ' ];
@@ -850,7 +850,7 @@ public function testGetLongestCommonBasePath(array $paths, ?string $basePath)
850
850
$ this ->assertSame ($ basePath , Path::getLongestCommonBasePath (...$ paths ));
851
851
}
852
852
853
- public function provideIsBasePathTests (): \Generator
853
+ public static function provideIsBasePathTests (): \Generator
854
854
{
855
855
// same paths
856
856
yield ['/base/path ' , '/base/path ' , true ];
@@ -939,7 +939,7 @@ public function testIsBasePath(string $path, string $ofPath, bool $result)
939
939
$ this ->assertSame ($ result , Path::isBasePath ($ path , $ ofPath ));
940
940
}
941
941
942
- public function provideJoinTests (): \Generator
942
+ public static function provideJoinTests (): \Generator
943
943
{
944
944
yield [['' , '' ], '' ];
945
945
yield [['/path/to/test ' , '' ], '/path/to/test ' ];
0 commit comments