Exemple #1
0
 protected function getDeposits()
 {
     $this->shipment = new \Skimia\LaPoste\Containers\Shipment($this->getDirLoader());
     $this->shipment->setMaildropInGinned();
     $this->shipment->setNewCodeRoutine(function ($productCode, $enveloppe) {
         switch ($productCode) {
             case '75':
                 return '2KXXXXX56857';
                 break;
         }
     });
     $production = new \Skimia\LaPoste\Params\ProductionSiteParams(__DIR__ . '/fixtures/conf/site1.php');
     $production->setContactor('special');
     $this->makeTestList($filename);
     $listLoader = new \Skimia\LaPoste\Lists\Loader\LaPosteTestListLoader($filename);
     return $this->shipment->bindList($production, '75', $listLoader);
 }
 public function testProductionParams()
 {
     $production = new \Skimia\LaPoste\Params\ProductionSiteParams(__DIR__ . '/fixtures/conf/site1.php');
     $this->assertEquals('depositor_coclico', $production->getDepositor()->getCOCLICO());
     $this->assertEquals('european_CE_identifier', $production->getContractor()->getEuropeanIdentifier());
     $this->assertEquals('default_contractor_corp_name', $production->getContractor()->getCorpName());
     $this->assertEquals('billing_coclico_default_contractor', $production->getContractor()->getBilling()->getCOCLICO());
     $this->assertEquals('special_contractor_corp_name', $production->getContractor('special')->getCorpName());
     //si aucun contact billing utiliser le contractor
     $this->assertEquals('special_COCLICO', $production->getContractor('special')->getBilling()->getCOCLICO());
     $this->assertEquals('S3C', $production->getEstablishment()->getS3CCode());
 }