function EntityTypeTest::testGetAccessControlClass

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetAccessControlClass()
  2. 10 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetAccessControlClass()
  3. 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetAccessControlClass()

Tests the getAccessControlClass() method.

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php, line 213

Class

EntityTypeTest
@coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetAccessControlClass() {
    $controller = $this->getTestHandlerClass();
    $entity_type = $this->setUpEntityType([
        'handlers' => [
            'access' => $controller,
        ],
    ]);
    $this->assertSame($controller, $entity_type->getAccessControlClass());
}

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