summaryrefslogtreecommitdiffstats
path: root/tests/lib/SetupTest.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2018-09-10 22:45:40 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2018-09-10 22:45:40 +0200
commit603a578a1c9baab2c9eda08d5a316ed25a0163bf (patch)
tree1d050a159ab95c22c91900dfcf3c8d7d10bde84e /tests/lib/SetupTest.php
parent62c03beb1d2dc133542c088e6c72b201211ccfba (diff)
downloadnextcloud-server-603a578a1c9baab2c9eda08d5a316ed25a0163bf.tar.gz
nextcloud-server-603a578a1c9baab2c9eda08d5a316ed25a0163bf.zip
Change return false to throw new
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
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 {