/** * @covers ::load * @covers ::getEntityTypeFromStaticClass * * Tests if an assertion is thrown if Entity::load() is called and there are * no subclasses defined that can return entities. * * @expectedException \Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException */ public function testLoadWithNoCorrespondingSubclasses() { $this->entityManager->expects($this->once())->method('getDefinitions')->will($this->returnValue(array())); // Call Entity::load statically and check that it throws an exception. Entity::load(1); }