You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
<?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}",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user