1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/tests/Feature/Bank/YodleeApiTest.php

70 lines
1.4 KiB
PHP
Raw Normal View History

2022-07-28 07:07:35 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace Tests\Feature\Bank;
use App\Helpers\Bank\Yodlee\Yodlee;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;
class YodleeApiTest extends TestCase
{
use DatabaseTransactions;
protected function setUp(): void
{
parent::setUp();
2022-07-28 09:33:47 +02:00
2022-07-30 03:43:24 +02:00
// $this->markTestSkipped('Skip test no company gateways installed');
2022-07-28 09:33:47 +02:00
2022-07-28 07:07:35 +02:00
}
public function testAccessTokenGeneration()
{
$yodlee = new Yodlee(true);
2022-07-28 09:33:47 +02:00
$access_token = $yodlee->getAccessToken('sbMem62e1e69547bfb1');
2022-07-28 07:07:35 +02:00
nlog($access_token);
$this->assertNotNull($access_token);
}
2022-07-28 09:33:47 +02:00
public function testGetAccounts()
2022-07-28 08:29:42 +02:00
{
2022-07-28 09:33:47 +02:00
2022-07-28 08:29:42 +02:00
$yodlee = new Yodlee(true);
2022-07-28 09:33:47 +02:00
// $data = [
// 'providerAccountId' => 11308693,
// ];
$access_token = $yodlee->getAccessToken('sbMem62e1e69547bfb1');
2022-07-28 08:29:42 +02:00
2022-07-28 09:33:47 +02:00
$accounts = $yodlee->getAccounts($access_token);
nlog($accounts);
2022-07-28 08:29:42 +02:00
}
2022-07-28 09:33:47 +02:00
// public function testCreateUser()
// {
// $yodlee = new Yodlee(true);
// $create_user = $yodlee->createUser();
// nlog($create_user);
// }
2022-07-28 07:07:35 +02:00
}