Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unused entity, and ledger tests (#14)
* Removed unused entity, and ledger tests * Ledger status test * ArrayResponse tests
- Loading branch information
1 parent
8aed424
commit a79065b
Showing
7 changed files
with
80 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Test\Entity\Customer; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Railsbank\Entity\Customer\GetLedger; | ||
|
||
class GetLedgerTest extends TestCase | ||
{ | ||
public function testGetLedger() | ||
{ | ||
$response = [ | ||
'iban' => 'GB1100001111GB', | ||
'uk_sort_code' => '10-10-11', | ||
'bic_swift' => '10023', | ||
'uk_account_number' => '10200111', | ||
'amount' => '103032.22', | ||
'asset_class' => 'UKGBP', | ||
'asset_type' => 'currency', | ||
'created_at' => '2019-01-01', | ||
'holder_id' => '1234', | ||
'last_modified_at' => '2019-03-22', | ||
'ledger_status' => 'ledger-status-ok', | ||
]; | ||
|
||
$entity = new GetLedger($response); | ||
|
||
self::assertEquals('GB1100001111GB', $entity->getIban()); | ||
self::assertEquals('10-10-11', $entity->getSortCode()); | ||
self::assertEquals('10023', $entity->getBicSwift()); | ||
self::assertEquals('10200111', $entity->getAccountNumber()); | ||
self::assertEquals('103032.22', $entity->getAmount()); | ||
self::assertEquals('UKGBP', $entity->getAssetClass()); | ||
self::assertEquals('currency', $entity->getAssetType()); | ||
self::assertEquals('2019-01-01', $entity->getCreatedAt()); | ||
self::assertEquals('1234', $entity->getHolderId()); | ||
self::assertEquals('103032.22', $entity->getCurrentBalance()); | ||
self::assertEquals('ledger-status-ok', $entity->getStatus()); | ||
self::assertEquals('2019-03-22', $entity->getLastModifiedAt()); | ||
self::assertTrue($entity->isLedgerStatusOk()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Test\Entity\Customer\EndUsers; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Railsbank\Entity\Customer\Ledger; | ||
|
||
class LedgerTest extends TestCase | ||
{ | ||
public function testLedger() | ||
{ | ||
$response = [ | ||
'ledger_id' => '1234', | ||
]; | ||
|
||
$entity = new Ledger($response); | ||
|
||
self::assertEquals('1234', $entity->getLedgerId()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters