27 lines
574 B
PHP
27 lines
574 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use Illuminate\Console\Command;
|
||
|
|
|
||
|
|
afterEach(function (): void {
|
||
|
|
\Mockery::close();
|
||
|
|
});
|
||
|
|
|
||
|
|
describe('UpsertEmployeesFormFile command', function (): void {
|
||
|
|
it('returns failure when input file does not exist', function (): void {
|
||
|
|
/** @var \Tests\TestCase $this */
|
||
|
|
// GIVEN
|
||
|
|
$filePath = '/tmp/does-not-exist.csv';
|
||
|
|
|
||
|
|
// WHEN
|
||
|
|
$result = $this->artisan('uwil:employees:upsert', [
|
||
|
|
'file' => $filePath,
|
||
|
|
]);
|
||
|
|
|
||
|
|
// THEN
|
||
|
|
$result->assertExitCode(Command::FAILURE);
|
||
|
|
});
|
||
|
|
|
||
|
|
});
|