You are here

public function DefaultPluginManagerTest::testGetCacheTags in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testGetCacheTags()
  2. 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testGetCacheTags()

@covers ::getCacheTags

File

core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php, line 355

Class

DefaultPluginManagerTest
Tests the DefaultPluginManager.

Namespace

Drupal\Tests\Core\Plugin

Code

public function testGetCacheTags() {
  $module_handler = $this
    ->prophesize(ModuleHandlerInterface::class);
  $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler
    ->reveal(), NULL);
  $cache_tags = $plugin_manager
    ->getCacheTags();
  $this
    ->assertIsArray($cache_tags);
  array_map(function ($cache_tag) {
    $this
      ->assertIsString($cache_tag);
  }, $cache_tags);
}