Exemplo n.º 1
0
 function it_updates_room(Client $client, Room $room)
 {
     $request = array('name' => 'Test name', 'is_archived' => false, 'privacy' => 'private', 'is_guest_accessible' => false, 'topic' => 'Testing', 'owner' => array('id' => '1222'));
     $room->getId()->shouldBeCalled()->willReturn(123456);
     $room->toJson()->shouldBeCalled()->willReturn($request);
     $client->put("/v2/room/123456", $request)->shouldBeCalled();
     $this->updateRoom($room);
 }
Exemplo n.º 2
0
 /**
  * Updates a room
  * More info: https://www.hipchat.com/docs/apiv2/method/update_room
  *
  * @param Room $room Existing room to be updated
  *
  * @return void
  */
 public function updateRoom(Room $room)
 {
     $this->client->put(sprintf("/v2/room/%s", $room->getId()), $room->toJson());
 }