Пример #1
0
 /**
  * @small
  * test absolute URL construction
  * @dataProvider provideSubDirURLs
  */
 function testGetAbsoluteURLSubDir($url, $expectedResult)
 {
     \OC::$WEBROOT = '/owncloud';
     $urlGenerator = new \OC\URLGenerator(null);
     $result = $urlGenerator->getAbsoluteURL($url);
     $this->assertEquals($expectedResult, $result);
 }
Пример #2
0
 /**
  * @small
  * test absolute URL construction
  * @dataProvider provideSubDirURLs
  */
 function testGetAbsoluteURLSubDir($url, $expectedResult)
 {
     \OC::$WEBROOT = '/owncloud';
     $config = $this->getMock('\\OCP\\IConfig');
     $cacheFactory = $this->getMock('\\OCP\\ICacheFactory');
     $urlGenerator = new \OC\URLGenerator($config, $cacheFactory);
     $result = $urlGenerator->getAbsoluteURL($url);
     $this->assertEquals($expectedResult, $result);
 }