function BlockValidationTest::testRequiredPropertyValuesMissing

Overrides ConfigEntityValidationTestBase::testRequiredPropertyValuesMissing

File

core/modules/block/tests/src/Kernel/BlockValidationTest.php, line 130

Class

BlockValidationTest
Tests validation of block entities.

Namespace

Drupal\Tests\block\Kernel

Code

public function testRequiredPropertyValuesMissing(?array $additional_expected_validation_errors_when_missing = NULL) : void {
    parent::testRequiredPropertyValuesMissing([
        'region' => [
            'region' => [
                'This is not a valid region of the <em class="placeholder">stark</em> theme.',
                'This value should not be null.',
            ],
        ],
        'theme' => [
            'region' => 'This block does not say which theme it appears in.',
        ],
    ]);
}

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