-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from mvdnbrk/fix-escaped-chars
A quoted contact named should not be quoted.
- Loading branch information
Showing
3 changed files
with
22 additions
and
3 deletions.
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
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 |
---|---|---|
|
@@ -50,6 +50,18 @@ public function email_address_with_non_allowed_prefix_is_stripped_off() | |
$this->assertEquals('[email protected]', $c->email); | ||
} | ||
|
||
/** @test */ | ||
public function a_quoted_name_should_be_unquoted() | ||
{ | ||
$c = new Contact('"John"', '[email protected]', 'hash'); | ||
$this->assertEquals('John', $c->name); | ||
$this->assertEquals('John <[email protected]>', $c->full); | ||
|
||
$c = new Contact("'John'", '[email protected]', 'hash'); | ||
$this->assertEquals('John', $c->name); | ||
$this->assertEquals('John <[email protected]>', $c->full); | ||
} | ||
|
||
/** @test */ | ||
public function hash_is_optional() | ||
{ | ||
|