Skip to content

Commit

Permalink
Merge pull request #552 from versh23/stomp-public
Browse files Browse the repository at this point in the history
[STOMP] make getStomp public
  • Loading branch information
makasim authored and versh23 committed Oct 19, 2018
1 parent 7316d06 commit 15d1ced
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/stomp/StompContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions pkg/stomp/Tests/StompContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 15d1ced

Please sign in to comment.