OrnoTest\Route\DispatcherTest::testDispatcherHandles405CorrectlyOnStandardStrategies PHP Method

testDispatcherHandles405CorrectlyOnStandardStrategies() public method

Asserts that a 405 exception is thrown whilst using standard strategies
    public function testDispatcherHandles405CorrectlyOnStandardStrategies()
    {
        $this->setExpectedException('Orno\\Http\\Exception\\MethodNotAllowedException', 'Method Not Allowed', 0);
        $collection = new Route\RouteCollection();
        $collection->post('/route', 'handler');
        $collection->put('/route', 'handler');
        $collection->delete('/route', 'handler');
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route');
    }