Clean up for Yodlee Tests

This commit is contained in:
David Bomba 2022-08-08 08:32:28 +10:00
parent 090f8f5dab
commit dc176aa3f8

View File

@ -24,21 +24,20 @@ class YodleeApiTest extends TestCase
{ {
parent::setUp(); parent::setUp();
// $this->markTestSkipped('Skip test no company gateways installed'); if(!config('ninja.yodlee.client_id'))
$this->markTestSkipped('Skip test no Yodlee API credentials found');
} }
public function testCreateUser() public function testYodleeInstance()
{ {
$yodlee = new Yodlee(); $yodlee = new Yodlee();
$yodlee->setTestMode(); $yodlee->setTestMode();
// $user = $yodlee->createUser();
// nlog($user);
$this->assertNotNull($yodlee); $this->assertNotNull($yodlee);
$this->assertInstanceOf(Yodlee::class, $yodlee);
} }
public function testAccessTokenGeneration() public function testAccessTokenGeneration()
@ -49,8 +48,6 @@ class YodleeApiTest extends TestCase
$access_token = $yodlee->getAccessToken(true); $access_token = $yodlee->getAccessToken(true);
// nlog($access_token);
$this->assertNotNull($access_token); $this->assertNotNull($access_token);
} }
@ -237,8 +234,10 @@ class YodleeApiTest extends TestCase
$yodlee->setTestMode(); $yodlee->setTestMode();
$transactions = $yodlee->getTransactionCategories(); $transactions = $yodlee->getTransactionCategories();
//
// nlog($transactions);
// nlog($transactions); $this->assertIsArray($transactions->transactionCategory);
} }
@ -351,7 +350,7 @@ class YodleeApiTest extends TestCase
$accounts = $yodlee->getAccounts(); $accounts = $yodlee->getAccounts();
// nlog($accounts); $this->assertIsArray($accounts->account);
} }
@ -409,7 +408,8 @@ class YodleeApiTest extends TestCase
$transactions = $yodlee->getTransactions(['categoryId' => 2, 'fromDate' => '2000-01-01']); $transactions = $yodlee->getTransactions(['categoryId' => 2, 'fromDate' => '2000-01-01']);
nlog($transactions); $this->assertIsArray($transactions->transaction);
//nlog($transactions);
} }