/** * Return all glossary entries for the given type. * * @param $type * @return array * @throws \ErrorException */ public function loadGlossary($type) { /** @var \diMuG\API\Interfaces\GlossaryInterface $glossary */ $glossary = $this->factory->create($this->load($type, 'glossary')); if ($glossary instanceof GlossaryInterface == true) { return $glossary->findAll(); } throw new \ErrorException('errors.glossary.interface'); }
/** * @param $config * @dataProvider dataProviderForDoNotCreate */ public function testDoNotCreate($config) { $this->setExpectedException('ErrorException'); $this->object->create($config); }