-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from helpscout/require-php-73
Require PHP 7.3 and upgrade PHPUnit 8
- Loading branch information
Showing
16 changed files
with
77 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ env: | |
language: php | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
|
||
before_script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,7 +248,9 @@ public function testExtract() | |
); | ||
$conversation->setCustomerWaitingSince($customerWaitingSince); | ||
|
||
$this->assertArraySubset([ | ||
$extractedConversation = $conversation->extract(); | ||
|
||
$firstLevelValues = [ | ||
'id' => 12, | ||
'number' => 3526, | ||
'threadCount' => 2, | ||
|
@@ -262,49 +264,77 @@ public function testExtract() | |
'subject' => 'Help', | ||
'preview' => 'Preview', | ||
'mailboxId' => 13, | ||
'assignee' => [ | ||
'createdAt' => '2017-04-21T14:39:56Z', | ||
'closedAt' => '2017-04-21T12:23:06Z', | ||
'closedBy' => 14, | ||
'userUpdatedAt' => '2017-04-21T03:12:06Z', | ||
]; | ||
|
||
$this->assertEquals( | ||
$firstLevelValues, | ||
array_intersect_assoc($extractedConversation, $firstLevelValues) | ||
); | ||
|
||
$this->assertEquals( | ||
[ | ||
'id' => 9865, | ||
'firstName' => 'Mr', | ||
'lastName' => 'Robot', | ||
], | ||
'createdBy' => [ | ||
$extractedConversation['assignee'] | ||
); | ||
|
||
$this->assertEquals( | ||
[ | ||
'id' => 12, | ||
'type' => 'customer', | ||
], | ||
'createdAt' => '2017-04-21T14:39:56Z', | ||
'closedAt' => '2017-04-21T12:23:06Z', | ||
'closedBy' => 14, | ||
'userUpdatedAt' => '2017-04-21T03:12:06Z', | ||
'source' => [ | ||
$extractedConversation['createdBy'] | ||
); | ||
|
||
$this->assertEquals( | ||
[ | ||
'type' => 'email', | ||
'via' => 'customer', | ||
], | ||
'cc' => [ | ||
'[email protected]', | ||
], | ||
'bcc' => [ | ||
'[email protected]', | ||
], | ||
'customer' => [ | ||
'id' => 152, | ||
'email' => '[email protected]', | ||
], | ||
'customerWaitingSince' => [ | ||
$extractedConversation['source'] | ||
); | ||
|
||
$this->assertEquals( | ||
['[email protected]'], | ||
$extractedConversation['cc'] | ||
); | ||
|
||
$this->assertEquals( | ||
['[email protected]'], | ||
$extractedConversation['bcc'] | ||
); | ||
|
||
$this->assertEquals(152, $extractedConversation['customer']['id']); | ||
$this->assertEquals( | ||
'[email protected]', | ||
$extractedConversation['customer']['email'] | ||
); | ||
|
||
$this->assertEquals( | ||
[ | ||
'time' => '2012-07-24T20:18:33Z', | ||
'friendly' => '20 hours ago', | ||
'latestReplyFrom' => 'customer', | ||
], | ||
'tags' => [ | ||
'Productive', | ||
], | ||
'fields' => [ | ||
[ | ||
'id' => 936, | ||
'name' => 'Account Type', | ||
'value' => 'Administrator', | ||
], | ||
], | ||
], $conversation->extract()); | ||
$extractedConversation['customerWaitingSince'] | ||
); | ||
|
||
$this->assertEquals(['Productive'], $extractedConversation['tags']); | ||
|
||
$this->assertEquals( | ||
[[ | ||
'id' => 936, | ||
'name' => 'Account Type', | ||
'value' => 'Administrator', | ||
]], | ||
$extractedConversation['fields'] | ||
); | ||
} | ||
|
||
public function testExtractsThreads() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters