Exemple #1
0
 /**
  * Tests get- and setHeaders.
  */
 public function testGetSetHeaders()
 {
     $request = new Request();
     $request->setHeaders(array('key' => 'value'));
     $this->assertCount(1, $request->getHeaders());
     $this->assertEquals('value', $request->getHeader('key'));
 }
Exemple #2
0
 /**
  * Tests createWithHeaders method.
  */
 public function testCreateWithHeaders()
 {
     $request = Request::createWithHeaders(array('header'));
     $this->assertContains('header', $request->getHeaders());
 }