Liip\RMT\Information\InformationCollector::hasRequest PHP Method

hasRequest() public method

public hasRequest ( $name )
    public function hasRequest($name)
    {
        return array_key_exists($name, $this->requests);
    }

Usage Example

 public function testRegisterRequests()
 {
     $ic = new InformationCollector();
     $this->assertFalse($ic->hasRequest('foo') || $ic->hasRequest('type'));
     $ic->registerRequests(array(new InformationRequest('foo'), 'type'));
     $this->assertTrue($ic->hasRequest('foo'));
     $this->assertTrue($ic->hasRequest('type'));
 }