/** * Tests the getFormObject() method with an invalid operation. * * @covers ::getFormObject * * @expectedException \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException */ 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'); }