getRelativePath() public method

Return the relative path from a file or directory to anothe
Author: Laurent Goussard
public getRelativePath ( string $from, string $to ) : string
$from string
$to string
return string
 public function testGetRelativePath()
 {
     // dir/
     $from = __DIR__;
     $to = dirname(dirname(__DIR__));
     $result = $this->fileSystem->getRelativePath($to, $from);
     // Relative path from base path: unit/
     $this->assertSame("unit/", $result);
 }
 public function testGetRelativePath()
 {
     // Unit dir: we are here now :D
     $from = __DIR__;
     // Base path: tests/
     $to = $this->basePath;
     $result = $this->fileSystem->getRelativePath($to, $from);
     // Relative path from base path: ./unit/
     $this->assertSame("./unit/", $result);
 }