/**
  * @see CreditCardEntity::toArray()
  */
 public function testToArray()
 {
     $entity = array('number' => str_repeat(rand(1, 9), 4) . str_repeat(rand(1, 9), 4) . str_repeat(rand(1, 9), 4) . str_repeat(rand(1, 9), 4), 'securityCode' => rand(1, 9) . rand(1, 9) . rand(1, 9), 'expirationDate' => rand(1, 9) . rand(1, 9) . rand(1, 9) . rand(1, 9) . '/' . rand(1, 9) . rand(1, 9), 'name' => 'person name ' . rand(1, 9) . rand(1, 9) . rand(1, 9));
     $this->object->setNumber($entity['number'])->setSecurityCode($entity['securityCode'])->setExpirationDate($entity['expirationDate'])->setName($entity['name']);
     $rs = $this->object->toArray();
     $this->assertSame($entity, $rs);
 }
 /**
  * Generate arry order.
  * @return array
  */
 public function toArray()
 {
     return array('expiration' => $this->expiration, 'type' => $this->type, 'paymentMethod' => $this->paymentMethod, 'paymentCountry' => $this->paymentCountry, 'ipAddress' => $this->ipAddress, 'cookie' => $this->cookie, 'userAgent' => $this->userAgent, 'order' => $this->order->toArray(), 'creditCard' => $this->creditCard->toArray(), 'payer' => $this->payer->toArray(), 'extraParameters' => $this->extraParameters->toArray());
 }