Ejemplo n.º 1
0
 /**
  * @covers Symfony\Components\HttpFoundation\ParameterBag::replace
  */
 public function testReplace()
 {
     $bag = new ParameterBag(array('foo' => 'bar'));
     $bag->replace(array('FOO' => 'BAR'));
     $this->assertEquals(array('FOO' => 'BAR'), $bag->all(), '->replace() replaces the input with the argument');
     $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input');
 }
Ejemplo n.º 2
0
 protected function initializeHeaders()
 {
     $headers = array();
     foreach ($this->server->all() as $key => $value) {
         if ('http_' === strtolower(substr($key, 0, 5))) {
             $headers[substr($key, 5)] = $value;
         }
     }
     return $headers;
 }