/** * Tests the getController() method when no controller is defined. * * @covers ::getController() * * @expectedException \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException */ public function testGetControllerMissingController() { $entity = $this->getMock('Drupal\\Core\\Entity\\EntityTypeInterface'); $entity->expects($this->once())->method('getControllerClass')->with('storage')->will($this->returnValue('')); $this->setUpEntityManager(array('test_entity_type' => $entity)); $this->entityManager->getController('test_entity_type', 'storage'); }