diff --git a/cosmogramme/tests/php/classes/AbonneIntegrationTest.php b/cosmogramme/tests/php/classes/AbonneIntegrationTest.php index dd318ac7259685da804fa6baa0f156f910d3f3a1..d429e8df278785f125449db8be8a5103cdf8db44 100644 --- a/cosmogramme/tests/php/classes/AbonneIntegrationTest.php +++ b/cosmogramme/tests/php/classes/AbonneIntegrationTest.php @@ -79,7 +79,7 @@ class AbonneIntegrationASCIIWithNoUsersInDbTest extends AbonneIntegrationASCIITe public function setup(){ parent::setup(); - $champs_sigb = ['1234','12','2','Tom','paul','ici','tp@afi-sa.fr']; + $champs_sigb = ['12 3 4','12','2','Tom','paul','ici','tp@afi-sa.fr']; $champs_sigb_ascii = implode(chr(9), $champs_sigb); $this->abon_config->importFicheAscii($champs_sigb_ascii); $this->user_tom = Class_Users::getFirstAttributeForLastCallOn('save'); @@ -88,7 +88,7 @@ class AbonneIntegrationASCIIWithNoUsersInDbTest extends AbonneIntegrationASCIITe /** @test **/ public function abonneSigbTomIdShouldBe1234() { - $this->assertEquals('1234', $this->user_tom->getIdabon()); + $this->assertEquals('12 3 4', $this->user_tom->getIdabon()); } } @@ -109,11 +109,11 @@ class AbonneIntegrationASCIIWithRoutoInDbTest extends AbonneIntegrationASCIITest 'password'=>'old']); Class_Users::whenCalled('findFirstBy') - ->with(['login'=>'55', + ->with(['login'=>'5 5', 'id_site'=>2]) ->answers($this->user_routo); - $champs_sigb_ascii = implode(chr(9), ['55', + $champs_sigb_ascii = implode(chr(9), ['5 5', '12', '2', 'Routo', @@ -128,7 +128,7 @@ class AbonneIntegrationASCIIWithRoutoInDbTest extends AbonneIntegrationASCIITest /** @test **/ public function withRoutoInDbImportShouldUpdateRoutoWithIdabon55() { - $this->assertEquals('55',$this->routo_after_import->getIdabon()); + $this->assertEquals('5 5',$this->routo_after_import->getIdabon()); } @@ -177,11 +177,11 @@ class AbonneIntegrationXMLWithRoutoInDbTest extends AbonneIntegrationXMLTestCase 'password'=>'allez les bleus']); Class_Users::whenCalled('findFirstBy') - ->with(['login'=>'01003080', + ->with(['login'=>'0100 3080', 'id_site'=>2]) ->answers($this->user_zozio); - $champs_sigb_xml = '<Item><TYPE_ABONNE>I</TYPE_ABONNE><LECTNUM>01003080</LECTNUM><LASTNAME>poirreau</LASTNAME><FIRSTNAME>Zozio</FIRSTNAME><FULLNAME>Piou Piou</FULLNAME><DATEBIRTH>12/31/2012</DATEBIRTH><MOT_DE_PASSE>allez les bleus</MOT_DE_PASSE></Item>'; + $champs_sigb_xml = '<Item><TYPE_ABONNE>I</TYPE_ABONNE><LECTNUM>0100 3080</LECTNUM><LASTNAME>poirreau</LASTNAME><FIRSTNAME>Zozio</FIRSTNAME><FULLNAME>Piou Piou</FULLNAME><DATEBIRTH>12/31/2012</DATEBIRTH><MOT_DE_PASSE>allez les bleus</MOT_DE_PASSE></Item>'; $this->abon_config->importFicheXml($champs_sigb_xml); @@ -190,7 +190,7 @@ class AbonneIntegrationXMLWithRoutoInDbTest extends AbonneIntegrationXMLTestCase /** @test **/ public function withRoutoInDbImportShouldUpdateRoutoWithIdabon55() { - $this->assertEquals('01003080',$this->zozio_after_import->getIdabon()); + $this->assertEquals('0100 3080',$this->zozio_after_import->getIdabon()); }