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); }
/** * 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')); }
public function testGetTypes() { $this->assertEquals(['email', 'popup_small', 'popup_big', 'popup_chat'], Conversation::getTypes()); }