mock(Filesystem::class, function ($mock) { $mock->shouldReceive('put') /*->withArgs(function ($path, $content) { $this->assertEquals(storage_path('options/cache.php'), $path); $this->assertTrue(Str::startsWith($content), 'once(); });*/ $this->artisan('options:cache')->expectsOutput('Options cached successfully.'); } }