public function setUp()
 {
     // Carrega dados da classe de cima
     parent::setUp();
     $this->em = $this->container->get('doctrine')->getManager();
     $this->hash = file_get_contents($this->data_dir . "instala/hash.json");
     $this->erro = file_get_contents($this->data_dir . "instala/erro.json");
     $rede = new Rede();
     $rede->setTeIpRede('10.209.8.0');
     $rede->setTeMascaraRede('255.255.255.255');
     $rede->setTeServCacic('http://localhost');
     $rede->setTeServUpdates('http://localhost');
     $rede->setTePathServUpdates('/msi');
     $rede->setNuLimiteFtp(100);
     $rede->setCsPermitirDesativarSrcacic('S');
     $rede->setDownloadMethod('http');
     //$this->em->persist($rede);
     $elemento = array('nmModulo' => 'cacic-service.exe', 'teVersaoModulo' => '3.0a1', 'csTipoSo' => 'windows', 'teHash' => '79df3561f83ac86eb19e2996b17d5e31', 'tipo' => 'cacic', 'tipoSo' => 'windows', 'filepath' => 'cacic/current/windows/cacic-service.exe');
     $tipo_so = $this->em->getRepository("CacicCommonBundle:TipoSo")->findOneBy(array('tipo' => 'windows'));
     $classe = new RedeVersaoModulo(null, null, null, null, null, $rede);
     $classe->setNmModulo($elemento['nmModulo']);
     $classe->setTeVersaoModulo($elemento['teVersaoModulo']);
     $classe->setDtAtualizacao(new \DateTime());
     $classe->setCsTipoSo($elemento['csTipoSo']);
     $classe->setTeHash($elemento['teHash']);
     $classe->setTipo('cacic');
     $classe->setTipoSo($tipo_so);
     $classe->setFilepath($elemento['filepath']);
     //$this->em->persist($classe);
     //$this->em->flush();
     // Carrega parâmetros globais
     $this->rede = $rede;
     $this->modulo = $classe;
     $this->tipo_so = $tipo_so;
     // Encontra hash do último serviço
     $rede = $this->em->getRepository("CacicCommonBundle:Rede")->findOneBy(array('teIpRede' => '0.0.0.0'));
     $cacic_service = $this->em->getRepository("CacicCommonBundle:RedeVersaoModulo")->getModulo($rede->getIdRede(), 'cacic-service.exe', 'windows');
     $this->hash_service = $cacic_service[0]['teHash'];
 }