fix logic and tests, update docker CI file
This commit is contained in:
@@ -2,9 +2,24 @@
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
try {
|
||||
$connection = DB::connection();
|
||||
$pdo = $connection->getPdo();
|
||||
if ($pdo->inTransaction()) {
|
||||
$connection->rollBack();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
}
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user