You are here

public function EntityTypeTest::testGetFormClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetFormClass()
  2. 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetFormClass()

Tests the getFormClass() method.

File

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

Class

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

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetFormClass() {
  $controller = $this
    ->getTestHandlerClass();
  $operation = 'default';
  $entity_type = $this
    ->setUpEntityType([
    'handlers' => [
      'form' => [
        $operation => $controller,
      ],
    ],
  ]);
  $this
    ->assertSame($controller, $entity_type
    ->getFormClass($operation));
}