. */ declare(strict_types=1); namespace Tests\Feature\Controllers\Import; use Exception; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Import\Routine\FakeRoutine; use FireflyIII\Import\Storage\ImportArrayStorage; use FireflyIII\Models\ImportJob; use FireflyIII\Models\Tag; use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; use Log; use Mockery; use Tests\TestCase; /** * Class JobStatusControllerTest * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class JobStatusControllerTest extends TestCase { /** * */ public function setUp() { parent::setUp(); Log::debug(sprintf('Now in %s.', \get_class($this))); } /** * @covers \FireflyIII\Http\Controllers\Import\JobStatusController */ public function testIndex(): void { $job = new ImportJob; $job->user_id = $this->user()->id; $job->key = 'Afake_job_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->provider = 'fake'; $job->file_type = ''; $job->save(); // call thing. $this->be($this->user()); $response = $this->get(route('import.job.status.index', [$job->key])); $response->assertStatus(200); $response->assertSee('