diff --git a/core/lib/Drupal/Component/FileCache/FileCache.php b/core/lib/Drupal/Component/FileCache/FileCache.php index 5fcdaa9..36b8337 100644 --- a/core/lib/Drupal/Component/FileCache/FileCache.php +++ b/core/lib/Drupal/Component/FileCache/FileCache.php @@ -155,6 +155,8 @@ public function delete($filepath) { /** * Resets the static cache. + * + * @todo Replace this once https://www.drupal.org/node/2260187 is in. */ public static function reset() { static::$cached = []; diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php index 3ca3872..e9eb7a7 100644 --- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php @@ -7,6 +7,7 @@ namespace Drupal\Tests\system\Kernel\Extension; +use Drupal\Component\FileCache\FileCacheFactory; use Drupal\Core\DependencyInjection\ContainerBuilder; use \Drupal\Core\Extension\ModuleUninstallValidatorException; use Drupal\KernelTests\KernelTestBase; @@ -21,6 +22,11 @@ class ModuleHandlerTest extends KernelTestBase { /** * {@inheritdoc} */ + public static $modules = ['system']; + + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); @@ -48,7 +54,7 @@ public function register(ContainerBuilder $container) { * The basic functionality of retrieving enabled modules. */ function testModuleList() { - $module_list = array(); + $module_list = ['system']; $this->assertModuleList($module_list, 'Initial'); diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php index 397b55e..2c02b7c 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php +++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php @@ -7,6 +7,7 @@ namespace Drupal\KernelTests; +use Drupal\Component\FileCache\FileCacheFactory; use Drupal\Core\Database\Database; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\visitor\vfsStreamStructureVisitor; @@ -91,6 +92,8 @@ public function testSetUp() { $this->assertEquals('on', $database->query("SHOW standard_conforming_strings")->fetchField()); $this->assertEquals('escape', $database->query("SHOW bytea_output")->fetchField()); } + + $this->assertNotNull(FileCacheFactory::getPrefix()); } /**