You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing, you need to require Composer's autoloader:
21
22
```
22
23
require 'vendor/autoload.php';
24
+
use SparkPost\SparkPost;
23
25
```
24
26
25
27
## Setting up a Request Adapter
@@ -50,6 +52,7 @@ $httpAdapter = new Guzzle6HttpAdapter(new Client());
50
52
$sparky = new SparkPost($httpAdapter, ['key'=>'YOUR API KEY']);
51
53
52
54
try {
55
+
// Build your email and send it!
53
56
$results = $sparky->transmission->send([
54
57
'from'=>'From Envelope <from@sparkpostbox.com>',
55
58
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>',
@@ -120,9 +123,10 @@ try {
120
123
Run `composer install` inside the directory to install dependecies and development tools.
121
124
122
125
### Testing
123
-
Once all the dependencies are installed, you can execute the unit tests using `vendor/bin/phpunit --bootstrap test/unit/bootstrap.php ./test/unit`.
124
-
125
-
If you're interested in code coverage, you can add the `--coverage` flag for phpunit like so: ```phpunit --coverage-html test/output/report --bootstrap test/unit/bootstrap.php ./test/unit```
126
+
Once all the dependencies are installed, you can execute the unit tests using:
127
+
```
128
+
composer test
129
+
```
126
130
127
131
### Contributing
128
132
1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
0 commit comments