Removed the setupReplication trait
This commit is contained in:
parent
279dd62a31
commit
64b0fa8382
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests\Channels;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Tests\TestsReplication;
|
||||
|
||||
class ChannelReplicationTest extends ChannelTest
|
||||
{
|
||||
use TestsReplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->setupReplication();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests\Channels;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Tests\TestsReplication;
|
||||
|
||||
class PresenceChannelReplicationTest extends PresenceChannelTest
|
||||
{
|
||||
use TestsReplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->setupReplication();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests\HttpApi;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Tests\TestsReplication;
|
||||
|
||||
class FetchChannelReplicationTest extends FetchChannelTest
|
||||
{
|
||||
use TestsReplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->setupReplication();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests\HttpApi;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Tests\TestsReplication;
|
||||
|
||||
class FetchChannelsReplicationTest extends FetchChannelsTest
|
||||
{
|
||||
use TestsReplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->setupReplication();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests\HttpApi;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Tests\TestsReplication;
|
||||
|
||||
class FetchUsersReplicationTest extends FetchUsersTest
|
||||
{
|
||||
use TestsReplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->setupReplication();
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace BeyondCode\LaravelWebSockets\Tests;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\PubSub\Drivers\LocalClient;
|
||||
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
trait TestsReplication
|
||||
{
|
||||
public function setupReplication()
|
||||
{
|
||||
app()->singleton(ReplicationInterface::class, function () {
|
||||
return new LocalClient();
|
||||
});
|
||||
|
||||
Config::set([
|
||||
'websockets.replication.enabled' => true,
|
||||
'websockets.replication.driver' => 'redis',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue