function EntityTypeTest::testGetFormClass
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetFormClass()
- 10 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 226
Class
- EntityTypeTest
- @coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetFormClass() {
$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.