/**
  * setup EntityManager and tmp dir
  *
  * @return void
  */
 public function setUp()
 {
     parent::setup();
     $this->em = $this->sm->get($this->emAlias);
     if ($this->tmpDir && !is_dir($this->tmpDir)) {
         mkdir($this->tmpDir);
     }
     $metadatas = $this->em->getMetadataFactory()->getAllMetadata();
     if (!empty($metadatas)) {
         $tool = new SchemaTool($this->em);
         $tool->createSchema($metadatas);
     } else {
         throw new SchemaException('No metadata classes to process');
     }
 }