mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-21 03:39:00 +00:00
First set of new tests.
This commit is contained in:
@@ -11,9 +11,26 @@ declare(strict_types = 1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
|
||||
use FireflyIII\Helpers\Help\HelpInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
class HelpControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\HelpController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$help = $this->mock(HelpInterface::class);
|
||||
$help->shouldReceive('hasRoute')->andReturn(true)->once();
|
||||
$help->shouldReceive('inCache')->andReturn(false)->once();
|
||||
$help->shouldReceive('getFromGithub')->andReturn('Help content here.')->once();
|
||||
$help->shouldReceive('putInCache')->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('help.show', ['index']));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user