/**
  * @dataProvider headersWithInjectionVectorsDataProvider
  * @test
  */
 public function doesNotAllowCRLFInjectionWhenCallingWithAddedHeader($name, $value)
 {
     $this->setExpectedException('InvalidArgumentException');
     $this->message->withAddedHeader($name, $value);
 }
Exemple #2
0
 /**
  * @test
  */
 public function testWithAddedHeaderAllowsHeaderContinuations()
 {
     $message = $this->message->withAddedHeader('X-Foo-Bar', "value,\r\n second value");
     $this->assertEquals("value,\r\n second value", $message->getHeaderLine('X-Foo-Bar'));
 }