This repository was archived by the owner on Oct 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,14 +167,21 @@ public function testSubscription()
167167 */
168168 public function testRequest ()
169169 {
170- $ this ->c ->subscribe ("sayhello " , function ($ res ) {
171- $ res ->reply ("Hello, " .$ res ->getBody (). " !!! " );
172- });
173-
174- $ this ->c ->request ('sayhello ' , 'McFly ' , function ($ message ) {
175- $ this ->assertNotNull ($ message );
176- $ this ->assertEquals ($ message , 'Hello, McFly !!! ' );
177- });
170+ $ this ->c ->subscribe (
171+ "sayhello " ,
172+ function ($ res ) {
173+ $ res ->reply ("Hello, " .$ res ->getBody (). " !!! " );
174+ }
175+ );
176+
177+ $ this ->c ->request (
178+ 'sayhello ' ,
179+ 'McFly ' ,
180+ function ($ message ) {
181+ $ this ->assertNotNull ($ message );
182+ $ this ->assertEquals ($ message , 'Hello, McFly !!! ' );
183+ }
184+ );
178185 }
179186
180187 /**
@@ -184,9 +191,12 @@ public function testRequest()
184191 */
185192 public function testUnsubscribe ()
186193 {
187- $ sid = $ this ->c ->subscribe ("unsub " , function ($ res ) {
188- $ this ->assertTrue (false );
189- });
194+ $ sid = $ this ->c ->subscribe (
195+ "unsub " ,
196+ function ($ res ) {
197+ $ this ->assertTrue (false );
198+ }
199+ );
190200 $ this ->c ->unsubscribe ($ sid );
191201 $ this ->c ->publish ('unsub ' , 'bar ' );
192202
You can’t perform that action at this time.
0 commit comments