You are here

public function ContainerTest::test_get_factoryServiceNew 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_get_factoryServiceNew()

Tests Container::get() for factories via services (Symfony 2.7.0). @covers ::get()

File

tests/src/DependencyInjection/ContainerTest.php, line 295
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_get_factoryServiceNew() {
  $factory_service = $this->container
    ->get('factory_service_new');
  $factory_service_class = $this->container
    ->getParameter('factory_service_class');
  $this
    ->assertInstanceOf($factory_service_class, $factory_service);
}