artisan(DumpPruneCommand::class, ['--hours' => 0]) ->assertFailed() ->expectsOutput('No prunings were attempted.'); } /** * If dumps are deleted, the Prune Database Dumps Command shall output '{Deleted Count} database dumps deleted'. * * @return void */ public function testDeleted(): void { Storage::fake(Config::get(DumpConstants::DISK_QUALIFIED)); $prunedCount = $this->faker->randomDigitNotNull(); Collection::times($prunedCount, function () { Date::setTestNow($this->faker->iso8601()); $action = new DumpWikiAction(); $action->handle(); }); Date::setTestNow(); $this->artisan(DumpPruneCommand::class, ['--hours' => -1]) ->assertSuccessful() ->expectsOutputToContain('Pruned'); } }