@@ -41,6 +41,18 @@ public function testGetConversation()
4141 $ this ->assertEquals (true , $ response ['open ' ]);
4242 }
4343
44+ public function testGetConversationWithDisplayAs ()
45+ {
46+ $ this ->setMockResponse ($ this ->client , 'Conversation/Conversation.txt ' );
47+ $ response = $ this ->client ->getConversation (['id ' => '123456 ' , 'display_as ' => 'plaintext ' ]);
48+
49+ $ this ->assertRequest ('GET ' , '/conversations/123456?display_as=plaintext ' );
50+
51+ $ this ->assertInstanceOf ('\Guzzle\Service\Resource\Model ' , $ response );
52+ $ this ->assertEquals ('25 ' , $ response ['conversation_message ' ]['author ' ]['id ' ]);
53+ $ this ->assertEquals (true , $ response ['open ' ]);
54+ }
55+
4456 public function testGetAllConversations ()
4557 {
4658 $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
@@ -74,6 +86,15 @@ public function testGetAdminConversations()
7486 $ this ->assertRequest ('GET ' , '/conversations?type=admin ' );
7587 }
7688
89+ public function testGetAdminConversationsWithDisplayAs ()
90+ {
91+ $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
92+ $ response = $ this ->client ->getConversations (['type ' => 'admin ' , 'display_as ' => 'plaintext ' ]);
93+ $ conversations = $ response ->get ('conversations ' );
94+
95+ $ this ->assertRequest ('GET ' , '/conversations?type=admin&display_as=plaintext ' );
96+ }
97+
7798 public function testReplyToConversation ()
7899 {
79100 $ this ->setMockResponse ($ this ->client , 'Conversation/Conversation.txt ' );
0 commit comments