hasParameter() public méthode

Queries whether the request contains a parameter or not.
public hasParameter ( string $name ) : boolean
$name string The name of the param we're query for
Résultat boolean TRUE if the parameter is available, else FALSE
 /**
  * Tests has non existing parameter on HTTP request instance.
  *
  * @return void
  */
 public function testHasParameterWhenNonExists()
 {
     // initialize the mock HTTP request
     $mockRequest = $this->getMock('AppserverIo\\Http\\HttpRequest');
     $mockRequest->expects($this->any())->method('hasParam')->will($this->returnValue(false));
     // inject the mock HTTP request
     $this->request->injectHttpRequest($mockRequest);
     // check for an non existing parameter
     $this->assertFalse($this->request->hasParameter('unknown'));
 }