Esempio n. 1
0
File: Loader.php Progetto: dimug/api
 /**
  * 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');
 }
Esempio n. 2
0
 /**
  * @param $config
  * @dataProvider dataProviderForDoNotCreate
  */
 public function testDoNotCreate($config)
 {
     $this->setExpectedException('ErrorException');
     $this->object->create($config);
 }