app->make(GeneratorCommand::class); $tester = $this->runCommand($command); $this->assertSame(0, $tester->getStatusCode()); $this->assertStringContainsString('A new helper file was written to _ide_helper.php', $tester->getDisplay()); $this->assertMatchesMockedSnapshot(); } public function testFilename(): void { $command = $this->app->make(GeneratorCommand::class); $tester = $this->runCommand($command, [ 'filename' => 'foo.php', ]); $this->assertSame(0, $tester->getStatusCode()); $this->assertStringContainsString('A new helper file was written to foo.php', $tester->getDisplay()); $this->assertMatchesMockedSnapshot(); } }