/** * @small * test linkTo URL construction in sub directory * @dataProvider provideSubDirAppUrlParts */ public function testLinkToSubDir($app, $file, $args, $expectedResult) { \OC::$WEBROOT = '/owncloud'; $config = $this->getMock('\\OCP\\IConfig'); $urlGenerator = new \OC\URLGenerator($config); $result = $urlGenerator->linkTo($app, $file, $args); $this->assertEquals($expectedResult, $result); }