diff options
Diffstat (limited to 'tests/lib/share/share.php')
-rw-r--r-- | tests/lib/share/share.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 1f95502919d..b8abfa29a81 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -849,6 +849,23 @@ class Test_Share extends \Test\TestCase { } /** + * @dataProvider urls + */ + function testRemoveProtocolFromUrl($url, $expectedResult) { + $share = new \OC\Share\Share(); + $result = \Test_Helper::invokePrivate($share, 'removeProtocolFromUrl', array($url)); + $this->assertSame($expectedResult, $result); + } + + function urls() { + return array( + array('http://owncloud.org', 'owncloud.org'), + array('https://owncloud.org', 'owncloud.org'), + array('owncloud.org', 'owncloud.org'), + ); + } + + /** * @dataProvider dataProviderTestGroupItems * @param type $ungrouped * @param type $grouped |