/**
  * @dataProvider headersProvider
  * @covers Agent::getHttpHeader
  */
 public function testInvalidHeader($headers)
 {
     $md = new Agent($headers);
     $this->assertNull($md->getHttpHeader('garbage_is_Garbage'));
 }
Esempio n. 2
0
 /**
  * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
  * 
  * Simply null is returned.
  *
  * @param string $header The name of the header to retrieve. Can be HTTP compliant such as
  *                       "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
  *                       all-caps, HTTP_ prefixed, underscore seperated awesomeness.
  * @return string|null The value of the header.
  * @static 
  */
 public static function getHttpHeader($header)
 {
     //Method inherited from \Mobile_Detect
     return \Jenssegers\Agent\Agent::getHttpHeader($header);
 }