Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added tests for SendGrid main class

  • Loading branch information...
commit cd56f738588cb8345ce88180e8eec598fb3c7653 1 parent b3e0878
CJ Buchmann authored
Showing with 36 additions and 0 deletions.
  1. +36 −0 Test/SendGridTest.php
View
36 Test/SendGridTest.php
@@ -0,0 +1,36 @@
+<?php
+
+class SendGridTest extends PHPUnit_Framework_TestCase
+{
+
+ public function testConstruction()
+ {
+ $sendgrid = new SendGrid("fake_username", "fake_password");
+
+ $this->assertEquals("SendGrid", get_class($sendgrid));
+ }
+
+ public function testInitializers()
+ {
+ $sendgrid = new SendGrid("fake_username", "fake_password");
+
+ // test the working initializers that we currently have
+ $smtp = $sendgrid->smtp;
+ $web = $sendgrid->web;
+
+ $this->assertEquals("SendGrid\Smtp", get_class($smtp));
+ $this->assertEquals("SendGrid\Web", get_class($web));
+
+ try
+ {
+ $sendgrid->notanapi;
+ }
+ catch (Exception $e)
+ {
+ return;
+ }
+
+ $this->fail('A non object was instanciated');
+
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.