Skip to content

Commit

Permalink
feat: refatoracao de testes utilizando fixtures e dtos (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Richard Pereira Martins dos Anjos <[email protected]>
  • Loading branch information
NinetiesPaul and Paul Richard Pereira Martins dos Anjos authored Aug 30, 2024
1 parent 87c2ad1 commit a4c0544
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Execution Groups
* @group execute_alone_group4
*/
class TramiteRecebimentoDocumentoAvulsoTest extends CenarioBaseTestCase
class TramiteRecebimentoDocumentoAvulsoTest extends FixtureCenarioBaseTestCase
{
const ALGORITMO_HASH_DOCUMENTO = 'SHA256';
const ALGORITMO_HASH_ASSINATURA = 'SHA256withRSA';
Expand Down Expand Up @@ -87,7 +87,7 @@ public function test_devolucao_processo_para_origem()
self::$documentoTeste3 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste2, self::$documentoTeste3);
$this->realizarTramiteExternoComValidacaoNoRemetente(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

/**
Expand Down Expand Up @@ -126,7 +126,8 @@ public function test_devolucao_processo_para_origem_documento_avulso()
self::$documentoTeste5 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste4, self::$documentoTeste5);
$this->realizarTramiteExternoComValidacaoNoRemetente(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
putenv("DATABASE_HOST=org2-database");
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Execution Groups
* @group execute_alone_group4
*/
class TramiteRecebimentoDocumentoAvulsoTest extends CenarioBaseTestCase
class TramiteRecebimentoDocumentoAvulsoTest extends FixtureCenarioBaseTestCase
{
const ALGORITMO_HASH_DOCUMENTO = 'SHA256';
const ALGORITMO_HASH_ASSINATURA = 'SHA256withRSA';
Expand Down Expand Up @@ -87,7 +87,7 @@ public function test_devolucao_processo_para_origem()
self::$documentoTeste3 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste2, self::$documentoTeste3);
$this->realizarTramiteExternoComValidacaoNoRemetente(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

/**
Expand Down Expand Up @@ -126,7 +126,8 @@ public function test_devolucao_processo_para_origem_documento_avulso()
self::$documentoTeste5 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste4, self::$documentoTeste5);
$this->realizarTramiteExternoComValidacaoNoRemetente(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
putenv("DATABASE_HOST=org2-database");
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Execution Groups
* @group execute_alone_group4
*/
class TramiteRecebimentoDocumentoAvulsoTest extends CenarioBaseTestCase
class TramiteRecebimentoDocumentoAvulsoTest extends FixtureCenarioBaseTestCase
{
const ALGORITMO_HASH_DOCUMENTO = 'SHA256';
const ALGORITMO_HASH_ASSINATURA = 'SHA256withRSA';
Expand Down Expand Up @@ -87,7 +87,8 @@ public function test_devolucao_processo_para_origem()
self::$documentoTeste3 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

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

/**
Expand Down Expand Up @@ -125,8 +126,8 @@ public function test_devolucao_processo_para_origem_documento_avulso()
self::$documentoTeste4 = $this->gerarDadosDocumentoInternoTeste(self::$remetente);
self::$documentoTeste5 = $this->gerarDadosDocumentoExternoTeste(self::$remetente);

$documentos = array(self::$documentoTeste4, self::$documentoTeste5);
$this->realizarTramiteExternoComValidacaoNoRemetente(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
putenv("DATABASE_HOST=org2-database");
$this->realizarTramiteExternoComValidacaoNoRemetenteFixture(self::$processoTeste, $documentos, self::$remetente, self::$destinatario);
}

/**
Expand Down

0 comments on commit a4c0544

Please sign in to comment.