getRoom() public method

public getRoom ( )
コード例 #1
0
ファイル: GuzzleSendTest.php プロジェクト: rcrowe/hippy
 public function testPost()
 {
     $guzzle = new Guzzle('123', 'cog', 'vivalacrowe');
     $message = new Message(true, 'green');
     $entity = m::mock('Guzzle\\Http\\Message\\EntityEnclosingRequest');
     $entity->shouldReceive('send')->once();
     // Build up the data we are sending to Hipchat
     $data = array('room_id' => $guzzle->getRoom(), 'from' => $guzzle->getFrom(), 'message' => $message->getMessage(), 'message_format' => $message->getMessageFormat(), 'notify' => $message->getNotification(), 'color' => $message->getBackgroundColor(), 'format' => 'json');
     $http = m::mock('Guzzle\\Http\\Client');
     $http->shouldReceive('post')->with('rooms/message?format=json&auth_token=123', array('Content-type' => 'application/x-www-form-urlencoded'), http_build_query($data))->andReturn($entity)->once();
     $guzzle->setHttp($http);
     $guzzle->send($message);
 }