mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-22 22:43:20 -06:00
0bcda34738
- Cleanup homepage. - Expanded libraries - Added limits (for budgets) - Extended models - Added popups for charts. - [skip-ci]
34 lines
824 B
PHP
34 lines
824 B
PHP
<?php
|
|
|
|
class HomeControllerTest extends TestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
}
|
|
|
|
public function testIndex()
|
|
{
|
|
// mock:
|
|
View::shouldReceive('share');
|
|
View::shouldReceive('make')->with('index')->once()->andReturn(\Mockery::self())
|
|
->shouldReceive('with')->once() // Pass a 'with' parameter
|
|
->with('count', 0);
|
|
Auth::shouldReceive('check')->andReturn(true);
|
|
|
|
// mock account repository
|
|
$accounts = $this->mock('Firefly\Storage\Account\AccountRepositoryInterface');
|
|
$accounts->shouldReceive('count')->andReturn(0);
|
|
|
|
// call
|
|
$this->call('GET', '/');
|
|
|
|
// test
|
|
$this->assertResponseOk();
|
|
}
|
|
|
|
public function tearDown()
|
|
{
|
|
Mockery::close();
|
|
}
|
|
}
|