You are here

public function ContainerAwarePluginManagerTest::test_hasDefinition in Service Container 7.2

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

File

tests/src/Plugin/ContainerAwarePluginManagerTest.php, line 49
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_hasDefinition() {
  $this
    ->assertTrue($this->controllerPluginManager
    ->hasDefinition('block'), 'service_container.controller.internal.block definition exists.');
  $this
    ->assertFalse($this->controllerPluginManager
    ->hasDefinition('not_exists'), 'service_container.controller.internal.not_exists definition exists not.');
}