forked from LiveCarta/PayPal-PHP-SDK
Refactoring tests
This commit is contained in:
@@ -175,8 +175,8 @@ class BillingAgreementsFunctionalTest extends TestCase
|
||||
$params = array('start_date' => date('Y-m-d', strtotime('-15 years')), 'end_date' => date('Y-m-d', strtotime('+5 days')));
|
||||
$result = Agreement::searchTransactions($agreement->getId(), $params, $this->apiContext, $this->mockPayPalRestCall);
|
||||
$this->assertNotNull($result);
|
||||
$this->assertTrue(is_array($result->getAgreementTransactionList()));
|
||||
$this->assertTrue(sizeof($result->getAgreementTransactionList()) > 0);
|
||||
$this->assertInternalType('array', $result->getAgreementTransactionList());
|
||||
$this->assertGreaterThan(0, sizeof($result->getAgreementTransactionList()));
|
||||
$list = $result->getAgreementTransactionList();
|
||||
$first = $list[0];
|
||||
$this->assertEquals($first->getTransactionId(), $agreement->getId());
|
||||
|
||||
@@ -63,7 +63,7 @@ class PayoutsFunctionalTest extends TestCase
|
||||
$this->assertEquals(PayoutsFunctionalTest::$batchId, $result->getBatchHeader()->getSenderBatchHeader()->getSenderBatchId());
|
||||
$this->assertEquals('SUCCESS', $result->getBatchHeader()->getBatchStatus());
|
||||
$items = $result->getItems();
|
||||
$this->assertTrue(sizeof($items) > 0);
|
||||
$this->assertGreaterThan(0, sizeof($items));
|
||||
$item = $items[0];
|
||||
$this->assertEquals('UNCLAIMED', $item->getTransactionStatus());
|
||||
return $result;
|
||||
|
||||
@@ -103,7 +103,7 @@ class WebhookFunctionalTest extends TestCase
|
||||
{
|
||||
$result = WebhookEventType::subscribedEventTypes($webhook->getId(), $this->apiContext, $this->mockPayPalRestCall);
|
||||
$this->assertNotNull($result);
|
||||
$this->assertEquals(2, sizeof($result->getEventTypes()));
|
||||
$this->assertCount(2, $result->getEventTypes());
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user