isLumen() ? 'stubs/Lumen' : 'stubs/Laravel'; foreach ([$pest, $helpers] as $file) { if (File::exists($file)) { throw new InvalidConsoleArgument(sprintf('%s already exist', $file)); } } File::copy(implode(DIRECTORY_SEPARATOR, [ dirname(__DIR__, 3), $stubs, 'Pest.php', ]), $pest); File::copy(implode(DIRECTORY_SEPARATOR, [ dirname(__DIR__, 3), $stubs, 'Helpers.php', ]), $helpers); $this->output->success('`tests/Pest.php` created successfully.'); $this->output->success('`tests/Helpers.php` created successfully.'); } /** * Determine if this is a Lumen application. */ protected function isLumen(): bool { return Str::startsWith(app()->version(), 'Lumen'); } }