You are here

protected property KernelTestBase::$backupStaticAttributesBlacklist in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::backupStaticAttributesBlacklist

Contains a few static class properties for performance.

File

core/tests/Drupal/KernelTests/KernelTestBase.php, line 128

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

protected $backupStaticAttributesBlacklist = [
  // Ignore static discovery/parser caches to speed up tests.
  'Drupal\\Component\\Discovery\\YamlDiscovery' => [
    'parsedFiles',
  ],
  'Drupal\\Core\\DependencyInjection\\YamlFileLoader' => [
    'yaml',
  ],
  'Drupal\\Core\\Extension\\ExtensionDiscovery' => [
    'files',
  ],
  'Drupal\\Core\\Extension\\InfoParser' => [
    'parsedInfos',
  ],
  // Drupal::$container cannot be serialized.
  'Drupal' => [
    'container',
  ],
  // Settings cannot be serialized.
  'Drupal\\Core\\Site\\Settings' => [
    'instance',
  ],
];