diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-05-13 17:41:18 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-05-13 17:41:18 +0200 |
commit | f5bc680f9c725c0aea166f3fc3eee8e0bcf5427c (patch) | |
tree | dc89b4a5dad4560af04e4224352d0cef521c9c3b /tests | |
parent | 7babd44dd07091abaa871b40df8e8b10073482a3 (diff) | |
parent | bab8c1f8e51a93443c29fdabfdc9951d0efde473 (diff) | |
download | nextcloud-server-f5bc680f9c725c0aea166f3fc3eee8e0bcf5427c.tar.gz nextcloud-server-f5bc680f9c725c0aea166f3fc3eee8e0bcf5427c.zip |
Merge pull request #8572 from owncloud/core-getabsolutepathwithzero
Fixed getAbsolutePath case when path is "0"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/view.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index f80dd06e1cb..a51b15857d5 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -585,4 +585,22 @@ class View extends \PHPUnit_Framework_TestCase { $info2 = $view->getFileInfo('/test/test'); $this->assertSame($info['etag'], $info2['etag']); } + + /** + * @dataProvider absolutePathProvider + */ + public function testGetAbsolutePath($expectedPath, $relativePath) { + $view = new \OC\Files\View('/files'); + $this->assertEquals($expectedPath, $view->getAbsolutePath($relativePath)); + } + + function absolutePathProvider() { + return array( + array('/files/', ''), + array('/files/0', '0'), + array('/files/', '/'), + array('/files/test', 'test'), + array('/files/test', '/test'), + ); + } } |