@@ -411,7 +411,7 @@ public function testSymlinkIsNotOverwrittenIfAlreadyCreated()
411411 }
412412
413413 /**
414- * @dataProvider provideAbsolutePaths
414+ * @dataProvider providePathsForMakePathRelative
415415 */
416416 public function testMakePathRelative ($ endPath , $ startPath , $ expectedPath )
417417 {
@@ -423,7 +423,7 @@ public function testMakePathRelative($endPath, $startPath, $expectedPath)
423423 /**
424424 * @return array
425425 */
426- public function provideAbsolutePaths ()
426+ public function providePathsForMakePathRelative ()
427427 {
428428 $ paths = array (
429429 array ('/var/lib/symfony/src/Symfony/ ' , '/var/lib/symfony/src/Symfony/Component ' , '../ ' ),
@@ -441,6 +441,30 @@ public function provideAbsolutePaths()
441441 return $ paths ;
442442 }
443443
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+
444468 /**
445469 * Returns file permissions as three digits (i.e. 755)
446470 *
0 commit comments