for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Vectorface\SnappyRouterTests\Exception;
use \PHPUnit_Framework_TestCase;
use Vectorface\SnappyRouter\Exception\MethodNotAllowedException;
/**
* Tests the MethodNotAllowedException class.
* @copyright Copyright (c) 2014, VectorFace, Inc.
* @author Dan Bruce <[email protected]>
*/
class MethodNotAllowedExceptionTest extends PHPUnit_Framework_TestCase
{
* An overview of how the class works.
* @test
public function synopsis()
$exception = new MethodNotAllowedException(
'Cannot use GET',
array('POST')
);
$this->assertEquals(405, $exception->getAssociatedStatusCode());
try {
throw $exception;
} catch (MethodNotAllowedException $e) {
$this->assertEquals('Cannot use GET', $e->getMessage());
}