/** * @dataProvider headersWithInjectionVectorsDataProvider * @test */ public function doesNotAllowCRLFInjectionWhenCallingWithHeader($name, $value) { $this->setExpectedException('InvalidArgumentException'); $this->message->withHeader($name, $value); }
/** * @test */ public function testWithHeaderAllowsHeaderContinuations() { $message = $this->message->withHeader('X-Foo-Bar', "value,\r\n second value"); $this->assertEquals("value,\r\n second value", $message->getHeaderLine('X-Foo-Bar')); }