Removed the setupReplication trait

This commit is contained in:
Alex Renoki 2020-08-13 16:16:39 +03:00
parent 279dd62a31
commit 64b0fa8382
6 changed files with 5 additions and 72 deletions

View File

@ -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();
}
//
}

View File

@ -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();
}
//
}

View File

@ -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();
}
//
}

View File

@ -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();
}
//
}

View File

@ -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();
}
//
}

View File

@ -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',
]);
}
}