diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2016-10-04 18:19:49 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2016-10-04 18:19:49 +0300 |
commit | f665b217c6a90d6b193ccc60b9fc5656d05728c3 (patch) | |
tree | 5b83ba636fcc7a4f8aca5ae77472fce1e6c981f5 /tests | |
parent | 729f0958dc9affca5ed56f6203b78100399b6309 (diff) |
Backport #26031 and #26105
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/OccControllerTest.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/Core/Controller/OccControllerTest.php b/tests/Core/Controller/OccControllerTest.php index 682d9170096..46221d68b54 100644 --- a/tests/Core/Controller/OccControllerTest.php +++ b/tests/Core/Controller/OccControllerTest.php @@ -46,7 +46,8 @@ class OccControllerTest extends TestCase { private $console; public function testFromInvalidLocation(){ - $this->getControllerMock('example.org'); + $fakeHost = 'example.org'; + $this->getControllerMock($fakeHost); $response = $this->controller->execute('status', ''); $responseData = $response->getData(); @@ -55,7 +56,7 @@ class OccControllerTest extends TestCase { $this->assertEquals(126, $responseData['exitCode']); $this->assertArrayHasKey('details', $responseData); - $this->assertEquals('Web executor is not allowed to run from a different host', $responseData['details']); + $this->assertEquals('Web executor is not allowed to run from a host ' . $fakeHost, $responseData['details']); } public function testNotWhiteListedCommand(){ @@ -136,7 +137,10 @@ class OccControllerTest extends TestCase { 'core', $this->request, $this->config, - $this->console + $this->console, + $this->getMockBuilder('\OCP\ILogger') + ->disableOriginalConstructor() + ->getMock() ); } |