You are here

public function FixtureBase::__construct in Lightning Core 8.5

Same name and namespace in other branches
  1. 8.3 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::__construct()
  2. 8.4 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::__construct()

FixtureBase constructor.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: (optional) The service container.

File

tests/src/FixtureBase.php, line 80

Class

FixtureBase
Base class for contexts which set up and tear down a complete test fixture.

Namespace

Drupal\Tests\lightning_core

Code

public function __construct(ContainerInterface $container = NULL) {
  $this
    ->setContainer($container ?: \Drupal::getContainer());
}