public function OpcodeCacheTest::testOpcodeCache in Automatic Updates 8
Tests the functionality of supported PHP version readiness checks.
@dataProvider opcodeCacheProvider
File
- tests/
src/ Kernel/ ReadinessChecker/ OpcodeCacheTest.php, line 26
Class
- OpcodeCacheTest
- Tests opcode caching and execution via CLI.
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessCheckerCode
public function testOpcodeCache($ini, $ini_value, $failure) {
ini_set($ini, $ini_value);
$messages = $this->container
->get('automatic_updates.opcode_cache')
->run();
if ($failure) {
$this
->assertNotEmpty($messages);
self::assertEquals((string) $messages[0], 'Automatic updates cannot run via CLI when opcode file cache is enabled.');
}
else {
$this
->assertEmpty($messages);
}
}