function FieldUiTest::setUp

Same name in this branch
  1. 9 core/modules/field/tests/src/Functional/Views/FieldUITest.php \Drupal\Tests\field\Functional\Views\FieldUITest::setUp()
Same name in other branches
  1. 8.9.x core/modules/field/tests/src/Functional/Views/FieldUITest.php \Drupal\Tests\field\Functional\Views\FieldUITest::setUp()
  2. 8.9.x core/modules/field_ui/tests/src/Unit/FieldUiTest.php \Drupal\Tests\field_ui\Unit\FieldUiTest::setUp()
  3. 10 core/modules/field/tests/src/Functional/Views/FieldUITest.php \Drupal\Tests\field\Functional\Views\FieldUITest::setUp()
  4. 10 core/modules/field_ui/tests/src/Unit/FieldUiTest.php \Drupal\Tests\field_ui\Unit\FieldUiTest::setUp()
  5. 11.x core/modules/field/tests/src/Functional/Views/FieldUITest.php \Drupal\Tests\field\Functional\Views\FieldUITest::setUp()
  6. 11.x core/modules/field_ui/tests/src/Unit/FieldUiTest.php \Drupal\Tests\field_ui\Unit\FieldUiTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/field_ui/tests/src/Unit/FieldUiTest.php, line 26

Class

FieldUiTest
@coversDefaultClass \Drupal\field_ui\FieldUI

Namespace

Drupal\Tests\field_ui\Unit

Code

protected function setUp() : void {
    parent::setUp();
    $this->pathValidator = $this->createMock('Drupal\\Core\\Path\\PathValidatorInterface');
    $container = new ContainerBuilder();
    $container->set('path.validator', $this->pathValidator);
    \Drupal::setContainer($container);
}

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