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

getHttpMethods() public method

public getHttpMethods ( ) : array
return array
    public function getHttpMethods()
    {
        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');
 }