Refactoring tests

This commit is contained in:
Gabriel Caruso
2017-12-06 14:33:46 -02:00
parent 81c2c17fd7
commit c378f6dfbf
9 changed files with 18 additions and 18 deletions

View File

@@ -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());