Files
Atomcms-edit/tests/TestCase.php
T
2026-05-09 17:32:17 +02:00

28 lines
724 B
PHP
Executable File

<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use RuntimeException;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
protected function setUp(): void
{
parent::setUp();
// BELANGRIJK: Voorkom dat tests op productie draaien
$dbName = config('database.connections.mysql.database');
$env = config('app.env');
if ($env !== 'testing' || $dbName !== 'habbo_testing') {
throw new RuntimeException(
"Tests mogen alleen draaien op de 'habbo_testing' database in testing environment. " .
"Huidige database: {$dbName}, Environment: {$env}",
);
}
}
}