function RestResourceConfigValidationTest::setUp

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

Overrides ConfigEntityValidationTestBase::setUp

File

core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigValidationTest.php, line 31

Class

RestResourceConfigValidationTest
Tests validation of rest_resource_config entities.

Namespace

Drupal\Tests\rest\Kernel\Entity

Code

protected function setUp() : void {
    parent::setUp();
    $this->entity = RestResourceConfig::create([
        'id' => 'test',
        'plugin_id' => 'entity:date_format',
        'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
        'configuration' => [],
    ]);
    $this->entity
        ->save();
}

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