public function testGetRelativePathOnNull() { $view = new \OC\Files\View(); $this->assertNull($view->getRelativePath(null)); }
/** * @dataProvider relativePathProvider */ function testGetRelativePath($absolutePath, $expectedPath) { $view = new \OC\Files\View('/files'); // simulate a external storage mount point which has a trailing slash $view->chroot('/files/'); $this->assertEquals($expectedPath, $view->getRelativePath($absolutePath)); }