mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Extract email validation into a method
This commit is contained in:
parent
e3b9dd10c2
commit
9aa0aba77c
2 changed files with 16 additions and 2 deletions
|
@ -13,10 +13,17 @@ class InitCommandTest extends TestCase
|
|||
$command->parseAuthorString('John Smith <john@example.com>');
|
||||
}
|
||||
|
||||
function testParseInvalidAuthorString()
|
||||
function testParseEmptyAuthorString()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
$command->parseAuthorString('');
|
||||
}
|
||||
|
||||
function testParseAuthorStringWithInvalidEmail()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
$command->parseAuthorString('John Smith <john>');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue