Ejemplo n.º 1
0
 /**
  * @see TransactionEntity::setOrder()
  */
 public function testSetOrder()
 {
     $orderEntity = new OrderEntity();
     $accountId = 'accountId_' . rand(1, 9) . rand(1, 9) . rand(1, 9);
     $orderEntity->setAccountId($accountId);
     $referenceCode = 'referenceCode_' . rand(1, 9) . rand(1, 9) . rand(1, 9);
     $orderEntity->setReferenceCode($referenceCode);
     $description = 'description_' . rand(1, 9) . rand(1, 9) . rand(1, 9);
     $orderEntity->setDescription($description);
     $language = 'language_' . rand(1, 9) . rand(1, 9) . rand(1, 9);
     $orderEntity->setLanguage($language);
     $notifyUrl = 'http://notifyurl-' . rand(1, 9) . rand(1, 9) . rand(1, 9) . '.com';
     $orderEntity->setNotifyUrl($notifyUrl);
     $signature = sha1('signature');
     $orderEntity->setSignature($signature);
     $rs = $this->object->setOrder($orderEntity);
     $this->assertInstanceOf('\\PayU\\Entity\\Transaction\\TransactionEntity', $rs);
     $rs = $this->object->getOrder();
     $this->assertInstanceOf('\\PayU\\Entity\\Transaction\\Order\\OrderEntity', $rs);
     $this->assertEquals($accountId, $rs->getAccountId());
     $this->assertEquals($referenceCode, $rs->getReferenceCode());
     $this->assertEquals($description, $rs->getDescription());
     $this->assertEquals($language, $rs->getLanguage());
     $this->assertEquals($notifyUrl, $rs->getNotifyUrl());
     $this->assertEquals($signature, $rs->getSignature());
 }