1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 03:14:04 +00:00

convert test to pest

This commit is contained in:
Abrar Ahmad 2022-08-31 17:12:58 +05:00
parent a7e1a17cd0
commit cbdcec2bcd
2 changed files with 35 additions and 61 deletions

View file

@ -1,11 +1,12 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Bootstrappers;
use Illuminate\Bus\BatchRepository;
use Illuminate\Bus\DatabaseBatchRepository;
use Illuminate\Support\Facades\DB;
use ReflectionClass;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\Contracts\Tenant;
@ -32,10 +33,10 @@ class BatchTenancyBootstrapper implements TenancyBootstrapper
public function revert()
{
if ($this->previousConnection) {
// Access the resolved batch repository instance and replace its connection with the previously replaced one
// Access the resolved batch repository instance and replace its connection with the previously replaced one
$batchRepository = app(BatchRepository::class);
$batchRepository->setConnection($this->previousConnection);
$this->previousConnection = null;
}
}
}
}