<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\DB;

abstract class TestCase extends BaseTestCase
{
    use CreatesApplication;

    protected function runSqlFile($filePath)
    {
        if (file_exists($filePath)) {
            $sql = file_get_contents($filePath);
            DB::unprepared($sql);
        }
    }
    protected function setUp(): void
    {
        parent::setUp();
        $this->runSqlFile(database_path('seeds/data.sql'));
    }
}
