diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-09-10 23:45:40 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-09-10 23:45:40 +0300 |
commit | 603a578a1c9baab2c9eda08d5a316ed25a0163bf (patch) | |
tree | 1d050a159ab95c22c91900dfcf3c8d7d10bde84e /tests | |
parent | 62c03beb1d2dc133542c088e6c72b201211ccfba (diff) |
Change return false to throw new
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/SetupTest.php | 15 |
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 { |