diff --git a/pkg/stomp/StompContext.php b/pkg/stomp/StompContext.php index 596eacba5..e03b11cb6 100644 --- a/pkg/stomp/StompContext.php +++ b/pkg/stomp/StompContext.php @@ -186,7 +186,7 @@ public function purgeQueue(Queue $queue): void throw PurgeQueueNotSupportedException::providerDoestNotSupportIt(); } - private function getStomp(): BufferedStompClient + public function getStomp(): BufferedStompClient { if (false == $this->stomp) { $stomp = call_user_func($this->stompFactory); diff --git a/pkg/stomp/Tests/StompContextTest.php b/pkg/stomp/Tests/StompContextTest.php index 036491b63..49297d3e1 100644 --- a/pkg/stomp/Tests/StompContextTest.php +++ b/pkg/stomp/Tests/StompContextTest.php @@ -213,6 +213,13 @@ public function testCreateTemporaryQueuesWithUniqueNames() $this->assertNotEquals($fooTempQueue->getStompName(), $barTempQueue->getStompName()); } + public function testShouldGetBufferedStompClient() + { + $context = new StompContext($this->createStompClientMock()); + + $this->assertInstanceOf(BufferedStompClient::class, $context->getStomp()); + } + /** * @return \PHPUnit_Framework_MockObject_MockObject|BufferedStompClient */