artisan('legacy:verify', ['--skip-legacy' => true]) ->assertSuccessful() ->expectsOutputToContain('Legacy-DB-Checks werden übersprungen.') ->expectsOutputToContain('OK import_map_targets') ->expectsOutputToContain('OK target_foreign_keys'); expect(Storage::disk('local')->files('migration'))->toHaveCount(1); }); test('legacy verify fails when an import map points to a missing target row', function () { /** @var TestCase $this */ DB::table('legacy_import_map')->insert([ 'legacy_portal' => 'presseecho', 'legacy_table' => 'sf_guard_user', 'legacy_id' => 123, 'target_table' => 'users', 'target_id' => 999_999, 'imported_at' => now(), ]); $this->artisan('legacy:verify', [ '--skip-legacy' => true, '--no-report' => true, ]) ->assertExitCode(Command::FAILURE) ->expectsOutputToContain('FAIL import_map_targets'); });