1
0
Fork 0
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:
Jordi Boggiano 2022-02-16 13:24:15 +01:00
parent f1ebc1d2b6
commit 28ec4fa7b0
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
2 changed files with 16 additions and 3 deletions

View file

@ -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;