rcrowe\Hippy\Client::setRoom PHP Method

setRoom() public method

Set the room that the message will be sent to.
public setRoom ( string $room ) : void
$room string Room name or id.
return void
    public function setRoom($room)
    {
        $this->transport->setRoom($room);
    }

Usage Example

Beispiel #1
0
 public function testRoom()
 {
     $transport = new Transport(null, null, null);
     $hippy = new Hippy($transport);
     $this->assertNull($hippy->getRoom());
     $hippy->setRoom('general');
     $this->assertEquals($hippy->getRoom(), 'general');
     $transport = new Transport(null, 'chilli', null);
     $hippy = new Hippy($transport);
     $this->assertEquals($hippy->getRoom(), 'chilli');
 }