/**
  * @expectedException Trellis\Common\Error\RuntimeException
  */
 public function testGetByEntityImplementorFoundMoreThanOne()
 {
     $article_fqcn = '\\Trellis\\Tests\\Runtime\\Fixtures\\Article';
     $article_type = new ArticleType();
     $map = new EntityTypeMap();
     $map->setItem('article_key', $article_type);
     $map->setItem('another_article_key', $article_type);
     $map_article_type = $map->getByEntityImplementor($article_fqcn);
 }
 protected function createEmbeddedTypeMap()
 {
     $entity_type_map = new EntityTypeMap();
     foreach ($this->getOption(self::OPTION_ENTITY_TYPES) as $embedded_type_class) {
         if (!class_exists($embedded_type_class)) {
             throw new RuntimeException(sprintf('Unable to load configured "embedded_entity_type" class called %s.', $embedded_type_class));
         }
         $embedded_type = new $embedded_type_class($this->getType(), $this);
         $entity_type_map->setItem($embedded_type->getPrefix(), $embedded_type);
     }
     return $entity_type_map;
 }