public function testGetRepositoryErrorEntityClass() { $this->setExpectedException("AssertionError", "Entity 'NoEntity' must be an instance of"); $pdoStub = $this->getMock("TestPDO"); $database = new Database($pdoStub); $database->getRepository("NoEntity"); }