Skip to content

Commit

Permalink
test: correção de testes funcionais (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvdias authored Sep 2, 2024
1 parent c06a15d commit b56c70a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ public function test_devolucao_processo_anexado_em_outro_para_origem()
self::$documentoTeste3 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

// Busca ID que Protocolo principal recebeu no org2
$parametros = [
'ProtocoloFormatado' => self::$protocoloTesteAnexado,
];
$objProtocoloFixture = new ProtocoloFixture();
$objProtocoloAnexadoDTO = $objProtocoloFixture->buscar($parametros)[0];
$objProtocoloAnexadoDTO = $this->consultarProcessoFixture(self::$protocoloTesteAnexado, \ProtocoloRN::$TP_PROCEDIMENTO);
$this->cadastrarDocumentoExternoFixture(self::$documentoTeste3, $objProtocoloAnexadoDTO->getDblIdProtocolo());

// Gerar dados de testes para representar o processo principal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ public function test_devolucao_processo_contendo_outro_anexado_para_origem()
$this->cadastrarDocumentoExternoFixture(self::$documentoTeste5, $objProtocoloAnexadoDTO->getDblIdProtocolo());

// Incluir novos documentos relacionados no processo anexado
$parametros = [
'ProtocoloFormatado' => self::$protocoloTestePrincipal,
];
$objProtocoloFixture = new ProtocoloFixture();
$objProtocoloPrincipalDTO = $objProtocoloFixture->buscar($parametros)[0];
$objProtocoloPrincipalDTO = $this->consultarProcessoFixture(self::$protocoloTestePrincipal, \ProtocoloRN::$TP_PROCEDIMENTO);

$this->anexarProcessoFixture($objProtocoloPrincipalDTO->getDblIdProtocolo(), $objProtocoloAnexadoDTO->getDblIdProtocolo());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function setUp(): void
// Carregar contexto de testes e dados sobre certificado digital
self::$remetente = $this->definirContextoTeste(CONTEXTO_ORGAO_B);
self::$destinatario = $this->definirContextoTeste(CONTEXTO_ORGAO_A);
putenv("DATABASE_HOST=org2-database");

// Instanciar objeto de teste utilizando o BeSimpleSoap
$localCertificado = self::$remetente['LOCALIZACAO_CERTIFICADO_DIGITAL'];
Expand Down Expand Up @@ -87,7 +88,7 @@ public function test_devolucao_processo_para_origem()
self::$documentoTeste3 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste2, self::$documentoTeste3);
putenv("DATABASE_HOST=org2-database");
putenv("DATABASE_HOST=org1-database");
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

Expand Down

0 comments on commit b56c70a

Please sign in to comment.