Neos\Flow\Mvc\Routing\Route::hasHttpMethodConstraints PHP Method

hasHttpMethodConstraints() public method

Whether or not this route is limited to one or more HTTP verbs
    public function hasHttpMethodConstraints()
    {
        return $this->httpMethods !== [];
    }

Usage Example

 /**
  * @test
  */
 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');
 }