コード例 #1
0
 /**
  * @test
  */
 public function shouldNotFaileIfEmptyDetailsGiven()
 {
     $klarna = new \Klarna();
     $request = new PopulateKlarnaFromDetails(new \ArrayObject(), $klarna);
     $action = new PopulateKlarnaFromDetailsAction();
     $action->execute($request);
     //Klarna does not provide a way to get data from its object. So we just test that there werent any errors.
 }
コード例 #2
0
 /**
  * @test
  */
 public function shouldCorrectlyPutPartialArticles()
 {
     $details = new \ArrayObject(array('partial_articles' => array(array('qty' => 4, 'artNo' => 'HANDLING', 'title' => 'Handling fee', 'price' => '50.99', 'vat' => '25', 'discount' => '0', 'flags' => 48))));
     $klarna = new \Klarna();
     $request = new PopulateKlarnaFromDetails($details, $klarna);
     $action = new PopulateKlarnaFromDetailsAction();
     $action->execute($request);
     //Klarna does not provide a way to get data from its object. So we just test that there werent any errors.
 }