You are here

public function ContainerAwarePluginManagerTest::test_getDefinitions in Service Container 7

Same name and namespace in other branches
  1. 7.2 tests/src/Plugin/ContainerAwarePluginManagerTest.php \Drupal\Tests\service_container\Plugin\ContainerAwarePluginManagerTest::test_getDefinitions()

@covers ::getDefinitions()

File

tests/src/Plugin/ContainerAwarePluginManagerTest.php, line 42
Contains \Drupal\Tests\service_container\Plugin\ContainerAwarePluginManagerTest

Class

ContainerAwarePluginManagerTest
@coversDefaultClass \Drupal\service_container\Plugin\ContainerAwarePluginManager @group dic

Namespace

Drupal\Tests\service_container\Plugin

Code

public function test_getDefinitions() {
  $filtered_definitions = array(
    'service_container.controller.internal.block' => $this->containerDefinition['services']['service_container.controller.internal.block'],
  );
  $this
    ->assertEquals($filtered_definitions, $this->controllerPluginManager
    ->getDefinitions(), 'getDefinitions() returns only definitions matching the prefix.');
}