20 lines
518 B
PHP
20 lines
518 B
PHP
<?php
|
|
|
|
namespace Tests;
|
|
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
|
|
|
abstract class TestCase extends BaseTestCase
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$currentDb = config('database.connections.mysql.database');
|
|
|
|
if (strtolower($currentDb) !== strtolower('d2dTest') && env('APP_ENV') === 'testing') {
|
|
throw new \Exception('KRITIKUS HIBA: A tesztek NEM a d2dTest adatbázison futnak! Aktuális adatbázis: ' . $currentDb);
|
|
}
|
|
}
|
|
}
|