public function EntityTypeManagerTest::testGetFormObjectInvalidOperation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::testGetFormObjectInvalidOperation()
Tests the getFormObject() method with an invalid operation.
@covers ::getFormObject
@expectedException \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 254 - Contains \Drupal\Tests\Core\Entity\EntityTypeManagerTest.
Class
- EntityTypeManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityTypeManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetFormObjectInvalidOperation() {
$entity = $this
->prophesize(EntityTypeInterface::class);
$entity
->getFormClass('edit')
->willReturn('');
$this
->setUpEntityTypeDefinitions([
'test_entity_type' => $entity,
]);
$this->entityTypeManager
->getFormObject('test_entity_type', 'edit');
}