function ContainerTest::testHasParameter

Tests that Container::hasParameter() works properly.

@legacy-covers ::hasParameter

File

core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php, line 109

Class

ContainerTest
Tests Drupal\Component\DependencyInjection\Container.

Namespace

Drupal\Tests\Component\DependencyInjection

Code

public function testHasParameter() : void {
  $this->assertTrue($this->container
    ->hasParameter('some_config'), 'Container parameters include %some_config%.');
  $this->assertFalse($this->container
    ->hasParameter('some_config_not_exists'), 'Container parameters do not include %some_config_not_exists%.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.