コード例 #1
0
 public function testMessageReturnsAnObject()
 {
     $AppResponse = new BrainSocketAppResponse();
     $response = $AppResponse->message('some.event');
     $this->assertObjectHasAttribute('data', $response);
     return $this->assertObjectHasAttribute('event', $response);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function broadcast(array $channels, $event, array $payload = [])
 {
     foreach ($channels as $channel) {
         $this->brainsocket->message($this->getEventName($channel, $event), $payload);
     }
 }