Skip to content
Snippets Groups Projects
Commit 299713a2 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#26089-fix-broken-transfert-date' into 'hotline-master'

Hotline#26089 fix broken transfert date

See merge request !930
parents d81c3918 178919ef
Branches
Tags
2 merge requests!940Master,!939Master
- ticket #26089 : Cosmogramme : Correction de la date de transfert lors de la mise en file d'attente des fichiers d'intégration
\ No newline at end of file
......@@ -169,7 +169,7 @@ class Class_Cosmogramme_Integration_PhasePrepareIntegrations extends Class_Cosmo
'type_operation' => $type_operation,
'profil' => $id_profil,
'type_doc' => $type_doc,
'date_transfert' => (new Class_Date)->DateDuJour('Y-m-d'),
'date_transfert' => $this->getCurrentDate(),
'fichier' => $filename,
'traite' => 'non']);
$integration->save();
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme_Integration_PhaseTestCase {
public function setUp() {
parent::setUp();
......@@ -55,6 +54,9 @@ abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme
Class_Cosmogramme_Integration_PhasePrepareIntegrations::setFileSystem($file_system);
$time_source = $this->mock()->whenCalled('time')->answers(strtotime('2015-03-26'));
Class_Cosmogramme_Integration_PhasePrepareIntegrations::setTimeSource($time_source);
$this->_phase = $this->_buildPhase('PrepareIntegrations')->run();
}
......@@ -171,6 +173,12 @@ class PhasePrepareIntegrationsWithOAITest extends PhasePrepareIntegrationsWithOA
}
/** @test */
public function secondIntegrationTransfertDateShouldBeBar() {
$this->assertEquals('2015-03-26', Class_Cosmogramme_Integration::find(3)->getDateTransfert());
}
/** @test */
public function logShouldContainsPhaseLabel() {
$this->assertLogContains('<h4>Déplacement des intégrations en file d\'attente</h4>');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment