Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 169e902

Browse files
fix my 'fix' + failing unit tests
1 parent 8bae445 commit 169e902

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/GoogleCloudPubSubAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected function getSubscriptionForChannel($channel)
190190
{
191191
$topic = $this->getTopicForChannel($channel);
192192
$clientIdentifier = $this->clientIdentifier ? $this->clientIdentifier : 'default';
193-
$clientIdentifier .= '.' . $topic;
193+
$clientIdentifier .= '.' . $channel;
194194
$subscription = $topic->subscription($clientIdentifier);
195195
if ($this->autoCreateSubscriptions && !$subscription->exists()) {
196196
$subscription->create();

tests/GoogleCloudPubSubAdapterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function testSubscribeWhenSubscriptionMustBeCreated()
172172
->andReturn(true);
173173
$topic->shouldNotHaveReceived('create');
174174
$topic->shouldReceive('subscription')
175-
->with('default')
175+
->with('default.channel_name')
176176
->once()
177177
->andReturn($subscription);
178178

@@ -247,7 +247,7 @@ public function testSubscribeWhenSubscriptionExists()
247247
->andReturn(true);
248248
$topic->shouldNotHaveReceived('create');
249249
$topic->shouldReceive('subscription')
250-
->with('default')
250+
->with('default.channel_name')
251251
->once()
252252
->andReturn($subscription);
253253

@@ -320,7 +320,7 @@ public function testSubscribeWhenAutoTopicCreationIsDisabled()
320320
->andReturn(true);
321321
$topic->shouldNotHaveReceived('create');
322322
$topic->shouldReceive('subscription')
323-
->with('default')
323+
->with('default.channel_name')
324324
->once()
325325
->andReturn($subscription);
326326

0 commit comments

Comments
 (0)