You've already forked Atomcms-edit
28 lines
724 B
PHP
Executable File
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}",
|
|
);
|
|
}
|
|
}
|
|
}
|