Skip to content

Commit

Permalink
Merge pull request #87 from SparkPost/tests
Browse files Browse the repository at this point in the history
add test for sparkpost send
  • Loading branch information
rajumsys committed Dec 23, 2016
2 parents 67e1a49 + 6d09c41 commit d6d1cd9
Show file tree
Hide file tree
Showing 4 changed files with 345 additions and 6 deletions.
4 changes: 1 addition & 3 deletions mailer.http.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ protected function get_sender()
protected function get_attachments()
{
$attachments = array();

foreach ($this->attachment as $attachment) {
foreach ($this->getAttachments() as $attachment) {
$attachments[] = array(
'name' => $attachment[2],
'type' => $attachment[4],
Expand Down Expand Up @@ -204,7 +203,6 @@ protected function handle_response($response)
return false;
}


if (property_exists($body, 'results')) {
$data = $body->results;
} else {
Expand Down
3 changes: 2 additions & 1 deletion tests/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"satooshi/php-coveralls": "^1.0",
"phpunit/phpunit": "^5.6",
"nyholm/nsa": "^1.0",
"mockery/mockery": "^0.9.5"
"mockery/mockery": "^0.9.5",
"php-mock/php-mock-phpunit": "^1.1"
},
"scripts": {
"test": "./vendor/bin/phpunit"
Expand Down
173 changes: 171 additions & 2 deletions tests/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d6d1cd9

Please sign in to comment.