Inheritance: extends PHPUnit_Framework_TestCase
Example #1
0
 /**
  * @depends testSerializationDeserialization
  * @param Sale $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getPaymentMode(), "TestSample");
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getReasonCode(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibility(), "TestSample");
     $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample");
     $this->assertEquals($obj->getClearingTime(), "TestSample");
     $this->assertEquals($obj->getPaymentHoldStatus(), "TestSample");
     $this->assertEquals($obj->getPaymentHoldReasons(), "TestSample");
     $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getReceivableAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getExchangeRate(), "TestSample");
     $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject());
     $this->assertEquals($obj->getReceiptId(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getProcessorResponse(), ProcessorResponseTest::getObject());
     $this->assertEquals($obj->getBillingAgreementId(), "TestSample");
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param InstallmentOption $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getTerm(), 123);
     $this->assertEquals($obj->getMonthlyPayment(), CurrencyTest::getObject());
     $this->assertEquals($obj->getDiscountAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getDiscountPercentage(), "TestSample");
 }
Example #3
0
 /**
  * @depends testSerializationDeserialization
  * @param RefundDetail $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getType(), "TestSample");
     $this->assertEquals($obj->getDate(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
 }
Example #4
0
 /**
  * @depends testSerializationDeserialization
  * @param Tax $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getPercent(), "12.34");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
 }
Example #5
0
 /**
  * @depends testSerializationDeserialization
  * @param PayoutItem $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getRecipientType(), "TestSample");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getReceiver(), "TestSample");
     $this->assertEquals($obj->getSenderItemId(), "TestSample");
 }
Example #6
0
 /**
  * @depends testSerializationDeserialization
  * @param Terms $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getType(), "TestSample");
     $this->assertEquals($obj->getMaxBillingAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getOccurrences(), "TestSample");
     $this->assertEquals($obj->getAmountRange(), CurrencyTest::getObject());
     $this->assertEquals($obj->getBuyerEditable(), "TestSample");
 }
 /**
  * @depends testSerializationDeserialization
  * @param CreditFinancingOffered $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getTotalCost(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTerm(), "12.34");
     $this->assertEquals($obj->getMonthlyPayment(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTotalInterest(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPayerAcceptance(), true);
     $this->assertEquals($obj->getCartAmountImmutable(), true);
 }
 /**
  * @depends testSerializationDeserialization
  * @param InvoiceItem $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getQuantity(), "12.34");
     $this->assertEquals($obj->getUnitPrice(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTax(), TaxTest::getObject());
     $this->assertEquals($obj->getDate(), "TestSample");
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param DetailedRefund $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getCustom(), "TestSample");
     $this->assertEquals($obj->getInvoiceNumber(), "TestSample");
     $this->assertEquals($obj->getRefundToPayer(), CurrencyTest::getObject());
     $this->assertEquals($obj->getRefundToExternalFunding(), ExternalFundingTest::getObject());
     $this->assertEquals($obj->getRefundFromTransactionFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getRefundFromReceivedAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTotalRefundedAmount(), CurrencyTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param PaymentInstruction $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getReferenceNumber(), "TestSample");
     $this->assertEquals($obj->getInstructionType(), "TestSample");
     $this->assertEquals($obj->getRecipientBankingInstruction(), RecipientBankingInstructionTest::getObject());
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPaymentDueDate(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Example #11
0
 /**
  * @depends testSerializationDeserialization
  * @param PaymentDefinition $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getType(), "TestSample");
     $this->assertEquals($obj->getFrequencyInterval(), "TestSample");
     $this->assertEquals($obj->getFrequency(), "TestSample");
     $this->assertEquals($obj->getCycles(), "TestSample");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getChargeModels(), ChargeModelTest::getObject());
 }
Example #12
0
 /**
  * @depends testSerializationDeserialization
  * @param Incentive $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getCode(), "TestSample");
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getMinimumPurchaseAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getLogoImageUrl(), "http://www.google.com");
     $this->assertEquals($obj->getExpiryDate(), "TestSample");
     $this->assertEquals($obj->getType(), "TestSample");
     $this->assertEquals($obj->getTerms(), "TestSample");
 }
 /**
  * @depends testSerializationDeserialization
  * @param Capture $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getAmount(), AmountTest::getObject());
     $this->assertEquals($obj->getIsFinalCapture(), true);
     $this->assertEquals($obj->getState(), "TestSample");
     $this->assertEquals($obj->getParentPayment(), "TestSample");
     $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getCreateTime(), "TestSample");
     $this->assertEquals($obj->getUpdateTime(), "TestSample");
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param InvoiceItem $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getQuantity(), "12.34");
     $this->assertEquals($obj->getUnitPrice(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTax(), TaxTest::getObject());
     $this->assertEquals($obj->getDate(), "TestSample");
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
     $this->assertEquals($obj->getImageUrl(), "http://www.google.com");
     $this->assertEquals($obj->getUnitOfMeasure(), "TestSample");
 }
 /**
  * @depends testSerializationDeserialization
  * @param PayoutBatchHeader $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getPayoutBatchId(), "TestSample");
     $this->assertEquals($obj->getBatchStatus(), "TestSample");
     $this->assertEquals($obj->getTimeCreated(), "TestSample");
     $this->assertEquals($obj->getTimeCompleted(), "TestSample");
     $this->assertEquals($obj->getSenderBatchHeader(), PayoutSenderBatchHeaderTest::getObject());
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getFees(), CurrencyTest::getObject());
     $this->assertEquals($obj->getErrors(), ErrorTest::getObject());
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Example #16
0
 /**
  * @depends testSerializationDeserialization
  * @param FundingSource $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getFundingMode(), "TestSample");
     $this->assertEquals($obj->getFundingInstrumentType(), "TestSample");
     $this->assertEquals($obj->getSoftDescriptor(), "TestSample");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getLegalText(), "TestSample");
     $this->assertEquals($obj->getFundingDetail(), FundingDetailTest::getObject());
     $this->assertEquals($obj->getAdditionalText(), "TestSample");
     $this->assertEquals($obj->getExtends(), FundingInstrumentTest::getObject());
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param AgreementTransaction $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getTransactionId(), "TestSample");
     $this->assertEquals($obj->getStatus(), "TestSample");
     $this->assertEquals($obj->getTransactionType(), "TestSample");
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getFeeAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getNetAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPayerEmail(), "TestSample");
     $this->assertEquals($obj->getPayerName(), "TestSample");
     $this->assertEquals($obj->getTimeStamp(), "TestSample");
     $this->assertEquals($obj->getTimeZone(), "TestSample");
 }
 /**
  * @depends testSerializationDeserialization
  * @param PayoutItemDetails $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getPayoutItemId(), "TestSample");
     $this->assertEquals($obj->getTransactionId(), "TestSample");
     $this->assertEquals($obj->getTransactionStatus(), "TestSample");
     $this->assertEquals($obj->getPayoutItemFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPayoutBatchId(), "TestSample");
     $this->assertEquals($obj->getSenderBatchId(), "TestSample");
     $this->assertEquals($obj->getPayoutItem(), PayoutItemTest::getObject());
     $this->assertEquals($obj->getTimeProcessed(), "TestSample");
     $this->assertEquals($obj->getErrors(), ErrorTest::getObject());
     $this->assertEquals($obj->getLinks(), LinksTest::getObject());
 }
Example #19
0
 /**
  * @depends testSerializationDeserialization
  * @param MerchantPreferences $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getSetupFee(), CurrencyTest::getObject());
     $this->assertEquals($obj->getCancelUrl(), "http://www.google.com");
     $this->assertEquals($obj->getReturnUrl(), "http://www.google.com");
     $this->assertEquals($obj->getNotifyUrl(), "http://www.google.com");
     $this->assertEquals($obj->getMaxFailAttempts(), "TestSample");
     $this->assertEquals($obj->getAutoBillAmount(), "TestSample");
     $this->assertEquals($obj->getInitialFailAmountAction(), "TestSample");
     $this->assertEquals($obj->getAcceptedPaymentType(), "TestSample");
     $this->assertEquals($obj->getCharSet(), "TestSample");
 }
 /**
  * @depends testSerializationDeserialization
  * @param TemplateData $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getMerchantInfo(), MerchantInfoTest::getObject());
     $this->assertEquals($obj->getBillingInfo(), BillingInfoTest::getObject());
     $this->assertEquals($obj->getShippingInfo(), ShippingInfoTest::getObject());
     $this->assertEquals($obj->getItems(), InvoiceItemTest::getObject());
     $this->assertEquals($obj->getPaymentTerm(), PaymentTermTest::getObject());
     $this->assertEquals($obj->getReference(), "TestSample");
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
     $this->assertEquals($obj->getShippingCost(), ShippingCostTest::getObject());
     $this->assertEquals($obj->getCustom(), CustomAmountTest::getObject());
     $this->assertEquals($obj->getAllowPartialPayment(), true);
     $this->assertEquals($obj->getMinimumAmountDue(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTaxCalculatedAfterDiscount(), true);
     $this->assertEquals($obj->getTaxInclusive(), true);
     $this->assertEquals($obj->getTerms(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getMerchantMemo(), "TestSample");
     $this->assertEquals($obj->getLogoUrl(), "http://www.google.com");
     $this->assertEquals($obj->getTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getAttachments(), FileAttachmentTest::getObject());
 }
Example #21
0
 /**
  * @depends testSerializationDeserialization
  * @param Search $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getEmail(), "TestSample");
     $this->assertEquals($obj->getRecipientFirstName(), "TestSample");
     $this->assertEquals($obj->getRecipientLastName(), "TestSample");
     $this->assertEquals($obj->getRecipientBusinessName(), "TestSample");
     $this->assertEquals($obj->getNumber(), "TestSample");
     $this->assertEquals($obj->getStatus(), "TestSample");
     $this->assertEquals($obj->getLowerTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getUpperTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getStartInvoiceDate(), "TestSample");
     $this->assertEquals($obj->getEndInvoiceDate(), "TestSample");
     $this->assertEquals($obj->getStartDueDate(), "TestSample");
     $this->assertEquals($obj->getEndDueDate(), "TestSample");
     $this->assertEquals($obj->getStartPaymentDate(), "TestSample");
     $this->assertEquals($obj->getEndPaymentDate(), "TestSample");
     $this->assertEquals($obj->getStartCreationDate(), "TestSample");
     $this->assertEquals($obj->getEndCreationDate(), "TestSample");
     $this->assertEquals($obj->getPage(), "12.34");
     $this->assertEquals($obj->getPageSize(), "12.34");
     $this->assertEquals($obj->getTotalCountRequired(), true);
 }
 /**
  * @depends testSerializationDeserialization
  * @param PaymentSummary $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getPaypal(), CurrencyTest::getObject());
     $this->assertEquals($obj->getOther(), CurrencyTest::getObject());
 }
 /**
  * @depends testSerializationDeserialization
  * @param ShippingCost $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getTax(), TaxTest::getObject());
 }
Example #24
0
 /**
  * @dataProvider mockProvider
  * @param Agreement $obj
  */
 public function testSetBalance($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true));
     $currency = CurrencyTest::getObject();
     $result = $obj->setBalance($currency, $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }
 /**
  * @depends testSerializationDeserialization
  * @param Invoice $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getId(), "TestSample");
     $this->assertEquals($obj->getNumber(), "TestSample");
     $this->assertEquals($obj->getUri(), "TestSample");
     $this->assertEquals($obj->getStatus(), "TestSample");
     $this->assertEquals($obj->getMerchantInfo(), MerchantInfoTest::getObject());
     $this->assertEquals($obj->getBillingInfo(), BillingInfoTest::getObject());
     $this->assertEquals($obj->getShippingInfo(), ShippingInfoTest::getObject());
     $this->assertEquals($obj->getItems(), InvoiceItemTest::getObject());
     $this->assertEquals($obj->getInvoiceDate(), "TestSample");
     $this->assertEquals($obj->getPaymentTerm(), PaymentTermTest::getObject());
     $this->assertEquals($obj->getDiscount(), CostTest::getObject());
     $this->assertEquals($obj->getShippingCost(), ShippingCostTest::getObject());
     $this->assertEquals($obj->getCustom(), CustomAmountTest::getObject());
     $this->assertEquals($obj->getTaxCalculatedAfterDiscount(), true);
     $this->assertEquals($obj->getTaxInclusive(), true);
     $this->assertEquals($obj->getTerms(), "TestSample");
     $this->assertEquals($obj->getNote(), "TestSample");
     $this->assertEquals($obj->getMerchantMemo(), "TestSample");
     $this->assertEquals($obj->getLogoUrl(), "http://www.google.com");
     $this->assertEquals($obj->getTotalAmount(), CurrencyTest::getObject());
     $this->assertEquals($obj->getPayments(), PaymentDetailTest::getObject());
     $this->assertEquals($obj->getRefunds(), RefundDetailTest::getObject());
     $this->assertEquals($obj->getMetadata(), MetadataTest::getObject());
     $this->assertEquals($obj->getAdditionalData(), "TestSample");
 }