/**
  * @param SimpleXMLElement $xml
  * @param Checkout $checkout
  */
 private function appendCheckoutData(SimpleXMLElement $xml, Checkout $checkout)
 {
     $this->appendOrder($xml, $checkout->getOrder());
     $this->appendCustomer($xml, $checkout->getCustomer());
     if ($redirectTo = $checkout->getRedirectTo()) {
         $xml->addChild('redirectURL', $redirectTo);
     }
     if ($maxUses = $checkout->getMaxUses()) {
         $xml->addChild('maxUses', $maxUses);
     }
     if ($maxAge = $checkout->getMaxAge()) {
         $xml->addChild('maxAge', $maxAge);
     }
 }
 /**
  * @test
  */
 public function getCustomerShouldReturnConfiguredCustomer()
 {
     $customer = $this->getMock(Customer::class, [], [], '', false);
     $this->checkout->setCustomer($customer);
     $this->assertSame($customer, $this->checkout->getCustomer());
 }