-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathIntercomConversationsTest.php
More file actions
62 lines (48 loc) · 1.75 KB
/
IntercomConversationsTest.php
File metadata and controls
62 lines (48 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace Intercom\Test;
use Intercom\IntercomConversations;
use stdClass;
class IntercomConversationsTest extends TestCase
{
public function testConversationCreate()
{
$this->client->method('post')->willReturn('foo');
$conversations = new IntercomConversations($this->client);
$this->assertSame('foo', $conversations->create([]));
}
public function testConversationsList()
{
$this->client->method('get')->willReturn('foo');
$users = new IntercomConversations($this->client);
$this->assertSame('foo', $users->getConversations([]));
}
public function testGetConversation()
{
$this->client->method('get')->willReturn('foo');
$users = new IntercomConversations($this->client);
$this->assertSame('foo', $users->getConversation("foo"));
}
public function testConversationSearch()
{
$this->client->method('post')->willReturn('foo');
$conversations = new IntercomConversations($this->client);
$this->assertSame('foo', $conversations->search([]));
}
public function testConversationNextSearch()
{
$this->client->method('nextSearchPage')->willReturn('foo');
$query = [];
$pages = new stdClass;
$pages->per_page = "10";
$pages->next = new stdClass;
$pages->next->starting_after = "abc";
$conversations = new IntercomConversations($this->client);
$this->assertSame('foo', $conversations->nextSearch([], $pages));
}
public function testReplyToConversation()
{
$this->client->method('post')->willReturn('foo');
$users = new IntercomConversations($this->client);
$this->assertSame('foo', $users->replyToConversation("bar", []));
}
}