Fix tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-07-11 15:31:33 +02:00
parent f6f49c77f7
commit 7c6c3d0d76
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68
2 changed files with 11 additions and 1 deletions

View file

@ -525,6 +525,10 @@ Raw output
return $this->config->getSystemValue('mail_smtpmode', 'php') === 'php';
}
protected function hasOpcacheLoaded(): bool {
return extension_loaded('opcache');
}
/**
* @return DataResponse
*/
@ -553,7 +557,7 @@ Raw output
'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),
'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
'hasOpcacheLoaded' => extension_loaded("opcache"),
'hasOpcacheLoaded' => $this->hasOpcacheLoaded(),
'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),

View file

@ -134,6 +134,7 @@ class CheckSetupControllerTest extends TestCase {
'hasMissingIndexes',
'isSqliteUsed',
'isPhpMailerUsed',
'hasOpcacheLoaded',
])->getMock();
}
@ -395,6 +396,10 @@ class CheckSetupControllerTest extends TestCase {
->expects($this->once())
->method('hasFileinfoInstalled')
->willReturn(true);
$this->checkSetupController
->expects($this->once())
->method('hasOpcacheLoaded')
->willReturn(true);
$this->checkSetupController
->expects($this->once())
->method('hasWorkingFileLocking')
@ -451,6 +456,7 @@ class CheckSetupControllerTest extends TestCase {
'hasPassedCodeIntegrityCheck' => true,
'codeIntegrityCheckerDocumentation' => 'http://docs.example.org/server/go.php?to=admin-code-integrity',
'isOpcacheProperlySetup' => false,
'hasOpcacheLoaded' => true,
'phpOpcacheDocumentation' => 'http://docs.example.org/server/go.php?to=admin-php-opcache',
'isSettimelimitAvailable' => true,
'hasFreeTypeSupport' => false,