示例#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'));
 }
示例#2
0
 /**
  * Tests createWithHeaders method.
  */
 public function testCreateWithHeaders()
 {
     $request = Request::createWithHeaders(array('header'));
     $this->assertContains('header', $request->getHeaders());
 }