RoleValidationTest.php

Same filename in other branches
  1. 11.x core/modules/user/tests/src/Kernel/RoleValidationTest.php

Namespace

Drupal\Tests\user\Kernel

File

core/modules/user/tests/src/Kernel/RoleValidationTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\user\Kernel;

use Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase;
use Drupal\user\Entity\Role;

/**
 * Tests validation of user_role entities.
 *
 * @group user
 * @group #slow
 */
class RoleValidationTest extends ConfigEntityValidationTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'user',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->entity = Role::create([
            'id' => 'test',
            'label' => 'Test',
        ]);
        $this->entity
            ->save();
    }

}

Classes

Title Deprecated Summary
RoleValidationTest Tests validation of user_role entities.

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