Files
pest/src/Laravel/PestServiceProvider.php
clmnt de593c3b93 Add a dusk command for Laravel.
This new command will replicate Dusk behavior with .env.dusk files
2020-11-24 10:07:06 +01:00

36 lines
867 B
PHP

<?php
declare(strict_types=1);
namespace Pest\Laravel;
use Illuminate\Support\ServiceProvider;
use Laravel\Dusk\Console\DuskCommand;
use Pest\Laravel\Commands\PestDatasetCommand;
use Pest\Laravel\Commands\PestDuskCommand;
use Pest\Laravel\Commands\PestInstallCommand;
use Pest\Laravel\Commands\PestTestCommand;
final class PestServiceProvider extends ServiceProvider
{
/**
* Register artisan commands.
*/
public function register(): void
{
if ($this->app->runningInConsole()) {
$this->commands([
PestInstallCommand::class,
PestTestCommand::class,
PestDatasetCommand::class,
]);
if (class_exists(DuskCommand::class)) {
$this->commands([
PestDuskCommand::class,
]);
}
}
}
}