function EntityTypeTest::testGetFormClass
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetFormClass()
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetFormClass()
- 11.x 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 228
Class
- EntityTypeTest
- @coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetFormClass() : void {
$controller = $this->getTestHandlerClass();
$operation = 'default';
$entity_type = $this->setUpEntityType([
'handlers' => [
'form' => [
$operation => $controller,
],
],
]);
$this->assertSame($controller, $entity_type->getFormClass($operation));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.