function ViewValidationTest::setUp

Same name in other branches
  1. 10 core/modules/views/tests/src/Kernel/Entity/ViewValidationTest.php \Drupal\Tests\views\Kernel\Entity\ViewValidationTest::setUp()

Overrides ConfigEntityValidationTestBase::setUp

File

core/modules/views/tests/src/Kernel/Entity/ViewValidationTest.php, line 26

Class

ViewValidationTest
Tests validation of view entities.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

protected function setUp() : void {
    parent::setUp();
    $this->entity = View::create([
        'id' => 'test',
        'label' => 'Test',
    ]);
    $this->entity
        ->save();
}

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