diff --git a/core/tests/Drupal/Tests/Core/PhpStorage/CacheStorageTest.php b/core/tests/Drupal/Tests/Core/PhpStorage/CacheStorageTest.php index 7e9223c..ff1caed 100644 --- a/core/tests/Drupal/Tests/Core/PhpStorage/CacheStorageTest.php +++ b/core/tests/Drupal/Tests/Core/PhpStorage/CacheStorageTest.php @@ -43,9 +43,12 @@ public function testCRUD() { * {@inheritdoc} */ protected function additionalAssertCRUD(PhpStorageInterface $php, $name) { - $this->assertEquals(opcache_get_status(TRUE)['scripts']["phar://$name"]['hits'], 0); - $php->load($name); - $this->assertEquals(opcache_get_status(TRUE)['scripts']["phar://$name"]['hits'], 1); + $this->assertTrue(isset(opcache_get_status(TRUE)['scripts']["phar://$name"]['hits'])); + if (ini_get('opcache.enable_cli')) { + $this->assertEquals(opcache_get_status(TRUE)['scripts']["phar://$name"]['hits'], 0); + $php->load($name); + $this->assertEquals(opcache_get_status(TRUE)['scripts']["phar://$name"]['hits'], 1); + } } }