diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-20 13:17:21 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-20 13:17:21 +0200 |
commit | 06e60f88c5adbe6190aafbd34ac641a76bebc37d (patch) | |
tree | e8c27c18f38b306d516664d964adbdc4b72687ca | |
parent | 8c703c954d7488067b50df4cc6616811e1434494 (diff) | |
download | nextcloud-server-06e60f88c5adbe6190aafbd34ac641a76bebc37d.tar.gz nextcloud-server-06e60f88c5adbe6190aafbd34ac641a76bebc37d.zip |
Don't assume the admin didn't configure Opcache correctly...
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | settings/Controller/CheckSetupController.php | 2 | ||||
-rw-r--r-- | tests/Settings/Controller/CheckSetupControllerTest.php | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index 5e2aa365f67..58de0f4e6d1 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -373,7 +373,7 @@ Raw output * Checks whether a PHP opcache is properly set up * @return bool */ - private function isOpcacheProperlySetup() { + protected function isOpcacheProperlySetup() { $iniWrapper = new IniGetWrapper(); $isOpcacheProperlySetUp = true; diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php index d9ba7d43672..49931994f02 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -68,8 +68,6 @@ class CheckSetupControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor()->getMock(); - $this->config = $this->getMockBuilder('\OCP\IConfig') - ->disableOriginalConstructor()->getMock(); $this->clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService') ->disableOriginalConstructor()->getMock(); $this->util = $this->getMockBuilder('\OC_Util') @@ -98,7 +96,7 @@ class CheckSetupControllerTest extends TestCase { $this->checker, $this->logger ]) - ->setMethods(['getCurlVersion', 'isPhpOutdated'])->getMock(); + ->setMethods(['getCurlVersion', 'isPhpOutdated', 'isOpcacheProperlySetup'])->getMock(); } public function testIsInternetConnectionWorkingDisabledViaConfig() { @@ -307,6 +305,10 @@ class CheckSetupControllerTest extends TestCase { ->expects($this->once()) ->method('isPhpOutdated') ->willReturn(true); + $this->checkSetupController + ->expects($this->once()) + ->method('isOpcacheProperlySetup') + ->willReturn(false); $this->urlGenerator->expects($this->at(2)) ->method('linkToDocs') ->with('admin-reverse-proxy') |