First set of new tests.

This commit is contained in:
James Cole
2017-02-12 12:21:44 +01:00
parent 69bd292ed8
commit 018af62826
23 changed files with 2193 additions and 135 deletions

View File

@@ -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);
}
}