<?php

use App\Models\ManagedEnvironment;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

it('throws when ManagedEnvironment::graphOptions is called', function (): void {
    $tenant = ManagedEnvironment::factory()->create([
        'app_client_id' => 'legacy-client-id',
        'app_client_secret' => 'legacy-client-secret',
    ]);

    $call = fn (): array => $tenant->graphOptions();

    expect($call)->toThrow(BadMethodCallException::class);
});
