@@ -41,20 +41,38 @@ public function testGetConversation()
41
41
$ this ->assertEquals (true , $ response ['open ' ]);
42
42
}
43
43
44
- public function testGetConversations ()
44
+ public function testGetAllConversations ()
45
45
{
46
46
$ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
47
47
$ response = $ this ->client ->getConversations ();
48
48
$ conversations = $ response ->get ('conversations ' );
49
49
50
- $ this ->assertRequest ('GET ' , '/conversations?type=user ' );
50
+ $ this ->assertRequest ('GET ' , '/conversations ' );
51
51
52
52
$ this ->assertInstanceOf ('\Guzzle\Service\Resource\Model ' , $ response );
53
53
$ this ->assertEquals (1 , count ($ conversations ));
54
54
$ this ->assertEquals (1400850973 , $ conversations ['0 ' ]['created_at ' ]);
55
55
$ this ->assertEquals ('536e564f316c83104c000020 ' , $ conversations ['0 ' ]['user ' ]['id ' ]);
56
56
$ this ->assertEquals ('admin ' , $ conversations ['0 ' ]['assignee ' ]['type ' ]);
57
57
}
58
+
59
+ public function testGetUserConversations ()
60
+ {
61
+ $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
62
+ $ response = $ this ->client ->getConversations (['type ' => 'user ' ]);
63
+ $ conversations = $ response ->get ('conversations ' );
64
+
65
+ $ this ->assertRequest ('GET ' , '/conversations?type=user ' );
66
+ }
67
+
68
+ public function testGetAdminConversations ()
69
+ {
70
+ $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
71
+ $ response = $ this ->client ->getConversations (['type ' => 'admin ' ]);
72
+ $ conversations = $ response ->get ('conversations ' );
73
+
74
+ $ this ->assertRequest ('GET ' , '/conversations?type=admin ' );
75
+ }
58
76
59
77
public function testReplyToConversation ()
60
78
{
0 commit comments