/** * @dataProvider headersWithInjectionVectorsDataProvider * @test */ public function doesNotAllowCRLFInjectionWhenCallingWithAddedHeader($name, $value) { $this->setExpectedException('InvalidArgumentException'); $this->message->withAddedHeader($name, $value); }
/** * @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')); }