<?php

declare(strict_types=1);

namespace Tests;

use Illuminate\Support\Facades\Artisan;
use LaravelZero\Framework\Contracts\Providers\ComposerContract;

final class MenuComponentTest extends TestCase
{
    /** @test */
    public function it_installs_the_required_packages(): void
    {
        $composerMock = $this->createMock(ComposerContract::class);

        $composerMock->expects($this->once())
            ->method('require')
            ->with('nunomaduro/laravel-console-menu "^3.0"');

        $this->app->instance(ComposerContract::class, $composerMock);

        Artisan::call('app:install', ['component' => 'menu']);
    }
}

Add unit test class for the Menu component
Add unit test class for the Menu component
