mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix handling of invalid emails
This commit is contained in:
parent
f1ebc1d2b6
commit
28ec4fa7b0
2 changed files with 16 additions and 3 deletions
|
@ -25,6 +25,14 @@ class InitCommandTest extends TestCase
|
|||
$this->assertEquals('john@example.com', $author['email']);
|
||||
}
|
||||
|
||||
public function testParseValidAuthorStringWithoutEmail()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
$author = $command->parseAuthorString('John Smith');
|
||||
$this->assertEquals('John Smith', $author['name']);
|
||||
$this->assertNull($author['email']);
|
||||
}
|
||||
|
||||
public function testParseValidUtf8AuthorString()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue