Skip to content

Commit 4e3c242

Browse files
authored
Apply latest Rector fixes
1 parent ab6990d commit 4e3c242

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

tests/Unit/Subscriptions/Broadcasters/EchoBroadcasterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testBroadcast(): void
2626
&& $event->data === 'foo'));
2727

2828
$redisBroadcaster = new EchoBroadcaster($broadcastManager);
29-
$subscriber = $this->createMock(Subscriber::class);
29+
$subscriber = $this->createStub(Subscriber::class);
3030
$subscriber->channel = 'test-123';
3131

3232
$redisBroadcaster->broadcast($subscriber, 'foo');
@@ -42,15 +42,15 @@ public function testBroadcastChannelNameIsNotModified(): void
4242
));
4343

4444
$redisBroadcaster = new EchoBroadcaster($broadcastManager);
45-
$subscriber = $this->createMock(Subscriber::class);
45+
$subscriber = $this->createStub(Subscriber::class);
4646
$subscriber->channel = 'private-test-123';
4747

4848
$redisBroadcaster->broadcast($subscriber, 'foo');
4949
}
5050

5151
public function testAuthorized(): void
5252
{
53-
$redisBroadcaster = new EchoBroadcaster($this->createMock(BroadcastManager::class));
53+
$redisBroadcaster = new EchoBroadcaster($this->createStub(BroadcastManager::class));
5454

5555
$request = new Request();
5656
$request['channel_name'] = 'abc';
@@ -64,7 +64,7 @@ public function testAuthorized(): void
6464

6565
public function testUnauthorized(): void
6666
{
67-
$redisBroadcaster = new EchoBroadcaster($this->createMock(BroadcastManager::class));
67+
$redisBroadcaster = new EchoBroadcaster($this->createStub(BroadcastManager::class));
6868

6969
$response = $redisBroadcaster->unauthorized(new Request());
7070
$this->assertSame(403, $response->getStatusCode());

tests/Unit/Subscriptions/Broadcasters/PusherBroadcasterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testPusherUsesLoggerInterface(): void
2828
$config = $this->app->make(ConfigRepository::class);
2929
$config->set('broadcasting.connections.pusher.log', true);
3030

31-
$subscriber = $this->createMock(Subscriber::class);
31+
$subscriber = $this->createStub(Subscriber::class);
3232
$subscriber->channel = 'test-123';
3333

3434
$this->broadcast($subscriber);
@@ -47,13 +47,13 @@ public function testPusherNeverUsesLoggerInterface(): void
4747
$config = $this->app->make(ConfigRepository::class);
4848
$config->set('broadcasting.connections.pusher.log', false);
4949

50-
$subscriber = $this->createMock(Subscriber::class);
50+
$subscriber = $this->createStub(Subscriber::class);
5151
$subscriber->channel = 'test-123';
5252

5353
$this->broadcast($subscriber);
5454
}
5555

56-
/** @param \Nuwave\Lighthouse\Subscriptions\Subscriber&\PHPUnit\Framework\MockObject\MockObject $subscriber */
56+
/** @param \Nuwave\Lighthouse\Subscriptions\Subscriber&\PHPUnit\Framework\MockObject\Stub $subscriber */
5757
private function broadcast(object $subscriber): void
5858
{
5959
$broadcastDriverManager = $this->app->make(BroadcastDriverManager::class);

tests/Unit/Subscriptions/Storage/RedisStorageManagerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static function (mixed $actualArgument) use ($argumentList, &$mockedMethodCall,
6666
public function testSubscriberByChannel(): void
6767
{
6868
/** @var \PHPUnit\Framework\MockObject\MockObject&\Illuminate\Contracts\Config\Repository $config */
69-
$config = $this->createMock(ConfigRepository::class);
69+
$config = $this->createStub(ConfigRepository::class);
7070
$redisConnection = $this->createMock(RedisConnection::class);
7171
$redisFactory = $this->mockRedisFactory($redisConnection);
7272

@@ -85,7 +85,7 @@ public function testSubscriberByChannel(): void
8585

8686
public function testDeleteSubscriber(): void
8787
{
88-
$config = $this->createMock(ConfigRepository::class);
88+
$config = $this->createStub(ConfigRepository::class);
8989
$redisConnection = $this->createMock(RedisConnection::class);
9090
$redisFactory = $this->mockRedisFactory($redisConnection);
9191

@@ -183,7 +183,7 @@ public function testStoreSubscriberWithoutTTL(): void
183183

184184
public function testSubscribersByTopic(): void
185185
{
186-
$config = $this->createMock(ConfigRepository::class);
186+
$config = $this->createStub(ConfigRepository::class);
187187
$redisConnection = $this->createMock(RedisConnection::class);
188188
$redisFactory = $this->mockRedisFactory($redisConnection);
189189

tests/Unit/Subscriptions/SubscriberTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testSerializable(): void
2929
{
3030
$args = ['foo' => 'bar'];
3131

32-
$resolveInfo = $this->createMock(ResolveInfo::class);
32+
$resolveInfo = $this->createStub(ResolveInfo::class);
3333
$fieldName = 'baz';
3434
$resolveInfo->fieldName = $fieldName;
3535

@@ -58,7 +58,7 @@ public function testEncryptedChannels(): void
5858
{
5959
$args = ['foo' => 'bar'];
6060

61-
$resolveInfo = $this->createMock(ResolveInfo::class);
61+
$resolveInfo = $this->createStub(ResolveInfo::class);
6262
$fieldName = 'baz';
6363
$resolveInfo->fieldName = $fieldName;
6464

0 commit comments

Comments
 (0)