|
|
|
|
@ -450,25 +450,4 @@ class ShareesAPIControllerTest extends TestCase { |
|
|
|
|
|
|
|
|
|
$this->assertEquals($expected, $this->invokePrivate($this->sharees, 'isV2')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @dataProvider dataTestFixRemoteUrl |
|
|
|
|
* |
|
|
|
|
* @param string $url |
|
|
|
|
* @param string $expected |
|
|
|
|
*/ |
|
|
|
|
public function testFixRemoteUrl($url, $expected) { |
|
|
|
|
$this->assertSame($expected, |
|
|
|
|
$this->invokePrivate($this->sharees, 'fixRemoteURL', [$url]) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function dataTestFixRemoteUrl() { |
|
|
|
|
return [ |
|
|
|
|
['http://localhost', 'http://localhost'], |
|
|
|
|
['http://localhost/', 'http://localhost'], |
|
|
|
|
['http://localhost/index.php', 'http://localhost'], |
|
|
|
|
['http://localhost/index.php/s/AShareToken', 'http://localhost'], |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|