mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 00:04:03 +00:00
Automigration test, config key, QueueTenancyBootstrapper support for QueueFake
This commit is contained in:
parent
be02f22484
commit
1df2b9d66d
3 changed files with 29 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\TenancyBootstrappers;
|
||||
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Support\Testing\Fakes\QueueFake;
|
||||
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
||||
use Stancl\Tenancy\Tenant;
|
||||
|
||||
|
|
@ -21,9 +22,11 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
$this->app = $app;
|
||||
|
||||
$bootstrapper = &$this;
|
||||
$this->app['queue']->createPayloadUsing(function () use (&$bootstrapper) {
|
||||
return $bootstrapper->getPayload();
|
||||
});
|
||||
if (! $queue = $this->app['queue'] instanceof QueueFake) {
|
||||
$queue->createPayloadUsing(function () use (&$bootstrapper) {
|
||||
return $bootstrapper->getPayload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function start(Tenant $tenant)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue