Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test for invalid credentials #21

Closed
wants to merge 4 commits into from

Conversation

theycallmeswift
Copy link
Contributor

This is the first half of dealing with #12. Still needs support for SMTP

@theycallmeswift
Copy link
Contributor Author

I cannot for the life of me figure out how to test this. Looks like PHPUnit is overriding the exception handler and my AuthException is never being thrown. Open to any help on this front. /cc @caseysoftware

@@ -21,6 +21,8 @@ public function testConstruction()

$this->assertEquals(get_class($smtp), 'SendGrid\Smtp');

// This really throws a SendGrid/AuthException IRL
// but PHPUnit does something to mess up exception handling.
$this->setExpectedException('Swift_TransportException');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wish this was:

$this->setExpectedException('SendGrid\AuthException');

@motdotla
Copy link
Contributor

motdotla commented Jul 8, 2013

Closing this. Completed at: #31

@motdotla motdotla closed this Jul 8, 2013
@motdotla motdotla deleted the ms-add-invalid-credentials-test branch July 8, 2013 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants