/** * Sets a response header * * @param string $key The name of the HTTP response header * @param mixed $value The value to set the header with * @access public * @return Response */ public function header($key, $value) { $this->headers->set($key, $value); return $this; }
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()); }