<?php

namespace Tricks\Monitoring\Tests;

use Orchestra\Testbench\Concerns\WithWorkbench;
use Override;
use Spatie\LaravelData\LaravelDataServiceProvider;
use Tricks\Monitoring\EloquentModels;
use Tricks\Monitoring\MonitoringServiceProvider;

class TestCase extends \Orchestra\Testbench\TestCase
{
    use WithWorkbench;

    protected function setUp(): void
    {
        $this->afterApplicationCreated(function () {
            app()->bind(EloquentModels::class, fn () => getEloquentModelsMock());
        });

        parent::setUp();
    }

    #[Override]
    protected function getPackageProviders($app): array
    {
        return [
            MonitoringServiceProvider::class,
            LaravelDataServiceProvider::class,
        ];
    }
}
