<?php

it('lists the init command', function () {
    $this->artisan('list')->expectsOutputToContain('init')->assertExitCode(0);
});

it('fails when only one non-interactive mode flag is provided', function () {
    $this->artisan('init --project-type=new')
        ->expectsOutputToContain('both `--project-type` and `--folder-mode` are required')
        ->assertExitCode(1);
});

it('fails existing project mode with a friendly message', function () {
    $this->artisan('init --project-type=existing --folder-mode=current')
        ->expectsOutputToContain('Initializing existing projects is not implemented yet.')
        ->assertExitCode(1);
});

it('fails non-interactive create mode without a directory', function () {
    $this->artisan('init --project-type=new --folder-mode=create --slug=test --url=test.prbts --db-name=test')
        ->expectsOutputToContain('Missing required project directory for `--folder-mode=create`.')
        ->assertExitCode(1);
});
