You are here

public function DefaultPluginManagerTest::testGetCacheMaxAge in Drupal 8

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

@covers ::getCacheMaxAge

File

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

Class

DefaultPluginManagerTest
Tests the DefaultPluginManager.

Namespace

Drupal\Tests\Core\Plugin

Code

public function testGetCacheMaxAge() {
  $module_handler = $this
    ->prophesize(ModuleHandlerInterface::class);
  $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler
    ->reveal(), NULL);
  $cache_max_age = $plugin_manager
    ->getCacheMaxAge();
  $this
    ->assertIsInt($cache_max_age);
}