Example #1
0
 public function testGetConversation()
 {
     $item = new Message();
     $conversation = Conversation::fromResponse(array('id' => 1));
     $item->conversation = $conversation;
     $this->assertInstanceOf(Conversation::class, $item->conversation);
     $this->assertEquals($conversation, $item->conversation);
 }
Example #2
0
 /**
  * Get conversation by id.
  *
  * @param int $id
  *
  * @return Conversation
  *
  * @throws InvalidArgumentException
  * @throws Exception
  */
 public function getConversation($id)
 {
     if ($this->isEmptyId($id)) {
         throw new InvalidArgumentException();
     }
     return Conversation::fromResponse($this->call('conversations/' . $id, [], 'get'));
 }
Example #3
0
 public function testGetTypes()
 {
     $this->assertEquals(['email', 'popup_small', 'popup_big', 'popup_chat'], Conversation::getTypes());
 }