@@ -1,9 +1,13 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
$db = Illuminate\Support\Facades\DB::connection();
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
$db = DB::connection();
|
||||
if (! $app->environment('testing') || $db->getDatabaseName() !== 'portal_services_test' || (string) $db->getConfig('port') !== '55441') {
|
||||
throw new RuntimeException('Isolated QA required');
|
||||
}
|
||||
@@ -50,7 +54,7 @@ SQL);
|
||||
$rejected = false;
|
||||
try {
|
||||
$db->unprepared($sql);
|
||||
} catch (Illuminate\Database\QueryException $e) {
|
||||
} catch (QueryException $e) {
|
||||
$rejected = $e->getCode() === '23514';
|
||||
}
|
||||
$db->statement('ROLLBACK TO SAVEPOINT mutation');
|
||||
|
||||
Reference in New Issue
Block a user