You are here

public function ContainerTest::test_hasParameter in Service Container 7.2

Same name and namespace in other branches
  1. 7 tests/src/DependencyInjection/ContainerTest.php \Drupal\Tests\service_container\DependencyInjection\ContainerTest::test_hasParameter()

Tests that Container::hasParameter() works properly. @covers ::hasParameter()

File

tests/src/DependencyInjection/ContainerTest.php, line 90
Contains \Drupal\Tests\service_container\DependencyInjection\ContainerTest

Class

ContainerTest
@coversDefaultClass \Drupal\service_container\DependencyInjection\Container @group dic

Namespace

Drupal\Tests\service_container\DependencyInjection

Code

public function test_hasParameter() {
  $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%.');
}