From 603a578a1c9baab2c9eda08d5a316ed25a0163bf Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 10 Sep 2018 22:45:40 +0200 Subject: Change return false to throw new Signed-off-by: Daniel Kesselberg --- tests/lib/SetupTest.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/lib') 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 { -- cgit v1.2.3