public function EntityTypeTest::testHasFormClasses in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testHasFormClasses()
Tests the hasFormClasses() method.
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeTest.php, line 219 - Contains \Drupal\Tests\Core\Entity\EntityTypeTest.
Class
- EntityTypeTest
- @coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testHasFormClasses() {
$controller = $this
->getTestHandlerClass();
$operation = 'default';
$entity_type1 = $this
->setUpEntityType(array(
'handlers' => array(
'form' => array(
$operation => $controller,
),
),
));
$entity_type2 = $this
->setUpEntityType(array(
'handlers' => array(),
));
$this
->assertTrue($entity_type1
->hasFormClasses());
$this
->assertFalse($entity_type2
->hasFormClasses());
}