Skip to content

Commit d5984eb

Browse files
authored
Merge pull request #552 from versh23/stomp-public
[STOMP] make getStomp public
2 parents a37069d + 17337e3 commit d5984eb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: pkg/stomp/StompContext.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function purgeQueue(Queue $queue): void
186186
throw PurgeQueueNotSupportedException::providerDoestNotSupportIt();
187187
}
188188

189-
private function getStomp(): BufferedStompClient
189+
public function getStomp(): BufferedStompClient
190190
{
191191
if (false == $this->stomp) {
192192
$stomp = call_user_func($this->stompFactory);

Diff for: pkg/stomp/Tests/StompContextTest.php

+7
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ public function testCreateTemporaryQueuesWithUniqueNames()
213213
$this->assertNotEquals($fooTempQueue->getStompName(), $barTempQueue->getStompName());
214214
}
215215

216+
public function testShouldGetBufferedStompClient()
217+
{
218+
$context = new StompContext($this->createStompClientMock());
219+
220+
$this->assertInstanceOf(BufferedStompClient::class, $context->getStomp());
221+
}
222+
216223
/**
217224
* @return \PHPUnit_Framework_MockObject_MockObject|BufferedStompClient
218225
*/

0 commit comments

Comments
 (0)