Fix tests.

This commit is contained in:
James Cole
2018-07-20 16:28:54 +02:00
parent 2d66a9212f
commit 49ff6febe5
14 changed files with 789 additions and 582 deletions

View File

@@ -38,7 +38,7 @@ class LinkControllerTest extends TestCase
/**
*
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Log::debug(sprintf('Now in %s.', \get_class($this)));
@@ -167,14 +167,14 @@ class LinkControllerTest extends TestCase
*/
public function testStoreInvalid(): void
{
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$linkRepos = $this->mock(LinkTypeRepositoryInterface::class);
$data = [
'link_other' => 0,
'link_type' => '1_inward',
];
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(null);
$journalRepos->shouldReceive('findNull')->andReturn(null);
$this->be($this->user());
$response = $this->post(route('transactions.link.store', [1]), $data);