Exemple #1
0
 /**
  * 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');
 }
Exemple #2
0
 /**
  * @param $config
  * @dataProvider dataProviderForDoNotCreate
  */
 public function testDoNotCreate($config)
 {
     $this->setExpectedException('ErrorException');
     $this->object->create($config);
 }