Exemplo n.º 1
0
 /**
  * Tests the getters and setters of the model
  * @test
  */
 public function setGetTest()
 {
     $sample = $this->getSampleData();
     $this->_transaction->setAmount($sample['amount'])->setCurrency($sample['currency'])->setPayment($sample['payment'])->setToken($sample['token'])->setClient($sample['client'])->setPreauthorization($sample['preauthorization'])->setFeeAmount($sample['fee_amount'])->setFeePayment($sample['fee_payment'])->setFeeCurrency($sample['fee_currency'])->setDescription($sample['description'])->setSource($sample['source'])->setShippingAddress($sample['shipping_address'])->setBillingAddress($sample['billing_address'])->setItems($sample['items'])->setMandateReference($sample['mandate_reference']);
     $this->assertEquals($this->_transaction->getAmount(), $sample['amount']);
     $this->assertEquals($this->_transaction->getCurrency(), $sample['currency']);
     $this->assertEquals($this->_transaction->getPayment(), $sample['payment']);
     $this->assertEquals($this->_transaction->getToken(), $sample['token']);
     $this->assertEquals($this->_transaction->getClient(), $sample['client']);
     $this->assertEquals($this->_transaction->getPreauthorization(), $sample['preauthorization']);
     $this->assertEquals($this->_transaction->getFeeAmount(), $sample['fee_amount']);
     $this->assertEquals($this->_transaction->getFeePayment(), $sample['fee_payment']);
     $this->assertEquals($this->_transaction->getFeeCurrency(), $sample['fee_currency']);
     $this->assertEquals($this->_transaction->getDescription(), $sample['description']);
     $this->assertEquals($this->_transaction->getSource(), $sample['source']);
     $this->assertEquals($this->_transaction->getShippingAddress(), $sample['shipping_address']);
     $this->assertEquals($this->_transaction->getBillingAddress(), $sample['billing_address']);
     $this->assertEquals($this->_transaction->getItems(), $sample['items']);
     $this->assertEquals($this->_transaction->getMandateReference(), $sample['mandate_reference']);
     return $this->_transaction;
 }