diff --git a/pkg/stomp/StompContext.php b/pkg/stomp/StompContext.php index 446a97500..c5584f04c 100644 --- a/pkg/stomp/StompContext.php +++ b/pkg/stomp/StompContext.php @@ -189,7 +189,7 @@ public function close() /** * @return BufferedStompClient */ - private function getStomp() + public function getStomp() { 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 f3b07a0ee..daa6f39e9 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 */