Respect\Rest\RouterTest::testOptionsRequestShouldNotCallOtherHandlers PHP Method

testOptionsRequestShouldNotCallOtherHandlers() public method

    public function testOptionsRequestShouldNotCallOtherHandlers()
    {
        // arrange
        $router = new Router();
        $router->get('/asian', 'GET: Asian Food!');
        $router->post('/asian', 'POST: Asian Food!');
        // act
        $response = (string) $router->dispatch('OPTIONS', '/asian')->response();
        // assert
        $this->assertHeaderContains('Allow: GET, POST', 'There should be a sent Allow header with all methods for the handler that match this request.');
        $this->assertEquals('', $response, 'OPTIONS request should never call any of the other registered handlers.');
    }