Skip to content

Commit b0867d8

Browse files
authored
Merge pull request #609 from php-enqueue/fix-tests-08
Fix Tests 0.8x
2 parents 3365fa7 + b462348 commit b0867d8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: pkg/rdkafka/Tests/RdKafkaConsumerTest.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testShouldReceiveFromQueueAndReturnNullIfNoMessageInQueue()
5050
$kafkaConsumer = $this->createKafkaConsumerMock();
5151
$kafkaConsumer
5252
->expects($this->once())
53-
->method('assign')
53+
->method('subscribe')
5454
;
5555
$kafkaConsumer
5656
->expects($this->once())
@@ -94,6 +94,8 @@ public function testShouldPassProperlyConfiguredTopicPartitionOnAssign()
9494
$this->createSerializerMock()
9595
);
9696

97+
$consumer->setOffset(12345);
98+
9799
$consumer->receive(1000);
98100
$consumer->receive(1000);
99101
$consumer->receive(1000);
@@ -109,7 +111,7 @@ public function testShouldSubscribeOnFirstReceiveOnly()
109111
$kafkaConsumer = $this->createKafkaConsumerMock();
110112
$kafkaConsumer
111113
->expects($this->once())
112-
->method('assign')
114+
->method('subscribe')
113115
;
114116
$kafkaConsumer
115117
->expects($this->any())
@@ -139,7 +141,7 @@ public function testThrowOnOffsetChangeAfterSubscribing()
139141
$kafkaConsumer = $this->createKafkaConsumerMock();
140142
$kafkaConsumer
141143
->expects($this->once())
142-
->method('assign')
144+
->method('subscribe')
143145
;
144146
$kafkaConsumer
145147
->expects($this->any())
@@ -174,7 +176,7 @@ public function testShouldReceiveFromQueueAndReturnMessageIfMessageInQueue()
174176
$kafkaConsumer = $this->createKafkaConsumerMock();
175177
$kafkaConsumer
176178
->expects($this->once())
177-
->method('assign')
179+
->method('subscribe')
178180
;
179181
$kafkaConsumer
180182
->expects($this->once())

0 commit comments

Comments
 (0)