Skip to content

Commit

Permalink
Test skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
fundead committed Nov 27, 2013
1 parent 8a13f62 commit b9f55fa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Expand Up @@ -13,6 +13,9 @@
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"suggest": {
"ext-curl": "*"
},
Expand Down
9 changes: 9 additions & 0 deletions phpunit.xml
@@ -0,0 +1,9 @@
<phpunit backupGlobals="false"
backupStaticAttributes="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Tests">
<directory suffix=".php">tests</directory>
</testsuite>
</testsuites>
</phpunit>
17 changes: 17 additions & 0 deletions tests/RaygunMessageTest.php
@@ -0,0 +1,17 @@
<?php
require_once realpath(__DIR__ . '../src/Raygun4php/Raygun4PhpException.php');

class RaygunMessageTest extends PHPUnit_Framework_TestCase
{

/**
* @expectedException Raygun4PhpException
* @expectedExceptionMessage API not valid, cannot send message to Raygun
*/
public function testSendReturns403WithInvalidApiKey()
{
$client = new \Raygun4php\RaygunClient("", true);
$client->SendException(new Exception(''));
}
}
?>

0 comments on commit b9f55fa

Please sign in to comment.