Skip to content

Commit d6d1cd9

Browse files
authored
Merge pull request #87 from SparkPost/tests
add test for sparkpost send
2 parents 67e1a49 + 6d09c41 commit d6d1cd9

File tree

4 files changed

+345
-6
lines changed

4 files changed

+345
-6
lines changed

mailer.http.class.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ protected function get_sender()
156156
protected function get_attachments()
157157
{
158158
$attachments = array();
159-
160-
foreach ($this->attachment as $attachment) {
159+
foreach ($this->getAttachments() as $attachment) {
161160
$attachments[] = array(
162161
'name' => $attachment[2],
163162
'type' => $attachment[4],
@@ -204,7 +203,6 @@ protected function handle_response($response)
204203
return false;
205204
}
206205

207-
208206
if (property_exists($body, 'results')) {
209207
$data = $body->results;
210208
} else {

tests/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"satooshi/php-coveralls": "^1.0",
66
"phpunit/phpunit": "^5.6",
77
"nyholm/nsa": "^1.0",
8-
"mockery/mockery": "^0.9.5"
8+
"mockery/mockery": "^0.9.5",
9+
"php-mock/php-mock-phpunit": "^1.1"
910
},
1011
"scripts": {
1112
"test": "./vendor/bin/phpunit"

tests/composer.lock

Lines changed: 171 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)