'testhost', 'root' => 'testroot', 'secure' => false ], 'http://testhost/remote.php/webdav/testroot/', ], [ [ 'host' => 'testhost', 'root' => 'testroot', 'secure' => true ], 'https://testhost/remote.php/webdav/testroot/', ], [ [ 'host' => 'http://testhost', 'root' => 'testroot', 'secure' => false ], 'http://testhost/remote.php/webdav/testroot/', ], [ [ 'host' => 'https://testhost', 'root' => 'testroot', 'secure' => false ], 'https://testhost/remote.php/webdav/testroot/', ], [ [ 'host' => 'https://testhost/testroot', 'root' => '', 'secure' => false ], 'https://testhost/testroot/remote.php/webdav/', ], [ [ 'host' => 'https://testhost/testroot', 'root' => 'subdir', 'secure' => false ], 'https://testhost/testroot/remote.php/webdav/subdir/', ], [ [ 'host' => 'http://testhost/testroot', 'root' => 'subdir', 'secure' => true ], 'http://testhost/testroot/remote.php/webdav/subdir/', ], [ [ 'host' => 'http://testhost/testroot/', 'root' => '/subdir', 'secure' => false ], 'http://testhost/testroot/remote.php/webdav/subdir/', ], ]; } /** * @dataProvider configUrlProvider */ public function testConfig($config, $expectedUri): void { $config['user'] = 'someuser'; $config['password'] = 'somepassword'; $instance = new OwnCloud($config); $this->assertEquals($expectedUri, $instance->createBaseUri()); } }