function ConfigEntityValidationTestBase::testEntityIsValid

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php \Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase::testEntityIsValid()

Ensures that the entity created in ::setUp() has no validation errors.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php, line 101

Class

ConfigEntityValidationTestBase
Base class for testing validation of config entities.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testEntityIsValid() : void {
    $this->assertInstanceOf(ConfigEntityInterface::class, $this->entity);
    $this->assertValidationErrors([]);
}

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