summaryrefslogtreecommitdiffstats
path: root/tests/lib/SetupTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/SetupTest.php')
-rw-r--r--tests/lib/SetupTest.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php
index fe3b1b54d23..40481de8f1d 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -134,18 +134,23 @@ class SetupTest extends \Test\TestCase {
/**
* @dataProvider findWebRootProvider
+ * @param $url
+ * @param $expected
*/
- public function testFindWebRootCli($url, $webRoot) {
+ public function testFindWebRootCli($url, $expected) {
$this->config
->expects($this->once())
->method('getValue')
->will($this->returnValue($url));
\OC::$CLI = true;
- $this->assertEquals(
- $webRoot,
- $this->setupClass::findWebRoot($this->config)
- );
+ try {
+ $webRoot = $this->setupClass::findWebRoot($this->config);
+ } catch (\InvalidArgumentException $e) {
+ $webRoot = false;
+ }
+
+ $this->assertEquals($webRoot, $expected);
}
public function findWebRootProvider(): array {