@@ -411,7 +411,7 @@ public function testSymlinkIsNotOverwrittenIfAlreadyCreated()
411
411
}
412
412
413
413
/**
414
- * @dataProvider provideAbsolutePaths
414
+ * @dataProvider providePathsForMakePathRelative
415
415
*/
416
416
public function testMakePathRelative ($ endPath , $ startPath , $ expectedPath )
417
417
{
@@ -423,7 +423,7 @@ public function testMakePathRelative($endPath, $startPath, $expectedPath)
423
423
/**
424
424
* @return array
425
425
*/
426
- public function provideAbsolutePaths ()
426
+ public function providePathsForMakePathRelative ()
427
427
{
428
428
$ paths = array (
429
429
array ('/var/lib/symfony/src/Symfony/ ' , '/var/lib/symfony/src/Symfony/Component ' , '../ ' ),
@@ -441,6 +441,30 @@ public function provideAbsolutePaths()
441
441
return $ paths ;
442
442
}
443
443
444
+ /**
445
+ * @dataProvider providePathsForIsAbsolutePath
446
+ */
447
+ public function testIsAbsolutePath ($ path , $ expectedResult )
448
+ {
449
+ $ result = $ this ->filesystem ->isAbsolutePath ($ path );
450
+
451
+ $ this ->assertEquals ($ expectedResult , $ result );
452
+ }
453
+
454
+ /**
455
+ * @return array
456
+ */
457
+ public function providePathsForIsAbsolutePath ()
458
+ {
459
+ return array (
460
+ array ('/var/lib ' , true ),
461
+ array ('c: \\\\var \\lib ' , true ),
462
+ array ('\\var \\lib ' , true ),
463
+ array ('var/lib ' , false ),
464
+ array ('../var/lib ' , false )
465
+ );
466
+ }
467
+
444
468
/**
445
469
* Returns file permissions as three digits (i.e. 755)
446
470
*
0 commit comments