@@ -364,31 +364,50 @@ public function testChangeExtension(string $path, string $extension, string $pat
364364
365365 public static function provideIsAbsolutePathTests (): \Generator
366366 {
367+ // UNIX-style absolute paths
367368 yield ['/css/style.css ' , true ];
368369 yield ['/ ' , true ];
369370 yield ['css/style.css ' , false ];
370371 yield ['' , false ];
371372
373+ // UNIX-style absolute paths with backslashes
372374 yield ['\\css \\style.css ' , true ];
373375 yield ['\\' , true ];
374376 yield ['css \\style.css ' , false ];
375377
378+ // Windows-style absolute paths
376379 yield ['C:/css/style.css ' , true ];
377380 yield ['D:/ ' , true ];
378381 yield ['C:///windows ' , true ];
379382 yield ['C://test ' , true ];
380383
384+ // Windows-style absolute paths with backslashes
381385 yield ['E: \\css \\style.css ' , true ];
382386 yield ['F: \\' , true ];
383387
388+ // Windows special case (drive only)
389+ yield ['C: ' , true ];
390+
391+ // URLs and stream wrappers are considered absolute
384392 yield ['phar:///css/style.css ' , true ];
385393 yield ['phar:/// ' , true ];
394+ yield ['http://example.com ' , true ];
395+ yield ['ftp://user@server/path ' , true ];
396+ yield ['vfs://root/file.txt ' , true ];
397+
398+ // "C:" without a slash is treated as a scheme by parse_url()
399+ yield ['C:css/style.css ' , true ];
400+
401+ // Relative paths
402+ yield ['/var/lib ' , true ];
403+ yield ['c: \\\\var \\lib ' , true ]; // c:\\var\lib
404+ yield ['\\var \\lib ' , true ];
405+ yield ['var/lib ' , false ];
406+ yield ['../var/lib ' , false ];
407+ yield ['' , false ];
386408
387- // Windows special case
388- yield ['C: ' , true ];
389-
390- // Not considered absolute
391- yield ['C:css/style.css ' , false ];
409+ // Empty path
410+ yield ['' , false ];
392411 }
393412
394413 /**
0 commit comments