Browse Source
Don't assume the admin didn't configure Opcache correctly...
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/4406/head
Joas Schilling
9 years ago
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with
6 additions and
4 deletions
-
settings/Controller/CheckSetupController.php
-
tests/Settings/Controller/CheckSetupControllerTest.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; |
|
|
|
|
|
|
|
@ -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') |
|
|
|
|