/**
  * Tests the getters and setters of the model
  * @test
  */
 public function setGetTest()
 {
     $sample = array('amount' => '4200', 'currency' => 'EUR', 'payment' => 'pay_2f82a672574647cd911d', 'token' => '098f6bcd4621d373cade4e832627b4f6', 'client' => 'client_c781b1d2f7f0f664b4d9', 'preauthorization' => 'preauth_ec54f67e52e92051bd65', 'fee_amount' => '420', 'fee_payment' => 'pay_098f6bcd4621d373cade4e832627b4f6', 'fee_currency' => 'EUR', 'description' => 'Test Transaction', 'source' => 'merchantcenter');
     $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']);
     $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']);
     return $this->_transaction;
 }
Exemplo n.º 2
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'])->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->getMandateReference(), $sample['mandate_reference']);
     return $this->_transaction;
 }