You are here

protected function FormBuilderTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\FormBuilderTest::setUp()

Overrides FormTestBase::setUp

File

core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php, line 45
Contains \Drupal\Tests\Core\Form\FormBuilderTest.

Class

FormBuilderTest
@coversDefaultClass \Drupal\Core\Form\FormBuilder @group Form

Namespace

Drupal\Tests\Core\Form

Code

protected function setUp() : void {
  parent::setUp();
  $this->container = new ContainerBuilder();
  $cache_contexts_manager = $this
    ->prophesize(CacheContextsManager::class)
    ->reveal();
  $this->container
    ->set('cache_contexts_manager', $cache_contexts_manager);
  \Drupal::setContainer($this->container);
}