Neos\Flow\Tests\Unit\Mvc\Routing\RouteTest::httpMethodConstraintsCanBeSetAndRetrieved PHP Method

httpMethodConstraintsCanBeSetAndRetrieved() public method

    public function httpMethodConstraintsCanBeSetAndRetrieved()
    {
        $this->assertFalse($this->route->hasHttpMethodConstraints(), 'hasHttpMethodConstraints should be FALSE by default');
        $httpMethods = ['POST', 'PUT'];
        $this->route->setHttpMethods($httpMethods);
        $this->assertTrue($this->route->hasHttpMethodConstraints(), 'hasHttpMethodConstraints should be TRUE if httpMethods are set');
        $this->assertEquals($httpMethods, $this->route->getHttpMethods());
        $this->route->setHttpMethods([]);
        $this->assertFalse($this->route->hasHttpMethodConstraints(), 'hasHttpMethodConstraints should be FALSE if httpMethods is empty');
    }
RouteTest