-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix header value parsing, should remove line separations (#62)
- Loading branch information
1 parent
25c87f3
commit 4df12c6
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,4 +110,16 @@ public function it_can_parse_a_string_with_more_than_one_parameter() | |
$this->assertEquals('charset=utf-8', (string)$header->getParameter('charset')); | ||
$this->assertEquals('foo=bar', (string)$header->getParameter('foo')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_can_parse_a_string_with_more_than_one_line() | ||
{ | ||
$header1 = HeaderValue::fromString("Name \"Quoted Name\"\r\n <[email protected]>"); | ||
$header2 = HeaderValue::fromString("Name \"Quoted Name\"\r\n <[email protected]>"); | ||
|
||
$this->assertEquals('Name "Quoted Name"<[email protected]>', $header1->getRaw()); | ||
$this->assertEquals('Name "Quoted Name" <[email protected]>', $header2->getRaw()); | ||
} | ||
} |