mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
25 lines
708 B
PHP
25 lines
708 B
PHP
![]() |
<?php
|
||
|
|
||
|
class TransactionControllerTest extends TestCase
|
||
|
{
|
||
|
|
||
|
public function testCreateWithdrawal()
|
||
|
{
|
||
|
View::shouldReceive('share');
|
||
|
View::shouldReceive('make')->with('transactions.withdrawal')->andReturn(\Mockery::self())
|
||
|
->shouldReceive('with')->once()
|
||
|
->with('accounts', [])
|
||
|
->andReturn(Mockery::self());
|
||
|
|
||
|
// mock account repository:
|
||
|
$accounts = $this->mock('Firefly\Storage\Account\AccountRepositoryInterface');
|
||
|
$accounts->shouldReceive('getActiveDefaultAsSelectList')->andReturn([]);
|
||
|
|
||
|
// call
|
||
|
$this->call('GET', '/transactions/add/withdrawal');
|
||
|
|
||
|
// test
|
||
|
$this->assertResponseOk();
|
||
|
}
|
||
|
|
||
|
}
|