Exemplo n.º 1
0
 /**
  * Gets the request user agent
  *
  * @access public
  * @return string
  */
 public function userAgent()
 {
     return $this->headers->get('USER_AGENT');
 }
 public function testSet()
 {
     // Test data
     $data = array('DOG_NAME' => 'cooper');
     // Create our collection with NO data
     $data_collection = new HeaderDataCollection();
     // Set our data from our test data
     $data_collection->set(key($data), current($data));
     // Make sure the set worked, but the key is different
     $this->assertSame(current($data), $data_collection->get(key($data)));
     $this->assertArrayNotHasKey(key($data), $data_collection->all());
 }