11<?php
22
3-
43namespace Enqueue \Stomp \Tests \Functional ;
54
6-
75use Enqueue \Stomp \StompConnectionFactory ;
86use Enqueue \Test \RabbitmqStompExtension ;
97use Stomp \Network \Observer \HeartbeatEmitter ;
@@ -15,15 +13,15 @@ class StompConnectionFactoryTest extends \PHPUnit\Framework\TestCase
1513
1614 public function testShouldNotCreateConnectionWithSendHeartbeat ()
1715 {
18- $ dsn = $ this ->getDsn () . ' & send_heartbeat=2000 ' ;
16+ $ dsn = $ this ->getDsn (). ' ? send_heartbeat=2000 ' ;
1917 $ factory = new StompConnectionFactory ($ dsn );
2018 $ this ->expectException (HeartbeatException::class);
2119 $ factory ->createContext ()->getStomp ();
2220 }
2321
2422 public function testShouldCreateConnectionWithSendHeartbeat ()
2523 {
26- $ dsn = $ this ->getDsn () . ' & send_heartbeat=2000&read_timeout=1 ' ;
24+ $ dsn = $ this ->getDsn (). ' ? send_heartbeat=2000&read_timeout=1 ' ;
2725 $ factory = new StompConnectionFactory ($ dsn );
2826 $ context = $ factory ->createContext ();
2927
@@ -35,7 +33,7 @@ public function testShouldCreateConnectionWithSendHeartbeat()
3533
3634 public function testShouldCreateConnectionWithReceiveHeartbeat ()
3735 {
38- $ dsn = $ this ->getDsn () . ' & receive_heartbeat=2000 ' ;
36+ $ dsn = $ this ->getDsn (). ' ? receive_heartbeat=2000 ' ;
3937 $ factory = new StompConnectionFactory ($ dsn );
4038 $ context = $ factory ->createContext ();
4139
@@ -44,5 +42,4 @@ public function testShouldCreateConnectionWithReceiveHeartbeat()
4442 $ this ->assertCount (1 , $ observers );
4543 $ this ->assertInstanceOf (ServerAliveObserver::class, $ observers [0 ]);
4644 }
47-
4845}
0 commit comments