mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Test InitCommand::parseAuthorString()
This commit is contained in:
parent
e4b48d39d0
commit
e3b9dd10c2
1 changed files with 22 additions and 0 deletions
22
tests/Composer/Test/Command/InitCommandTest.php
Normal file
22
tests/Composer/Test/Command/InitCommandTest.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Composer\Test\Autoload;
|
||||
|
||||
use Composer\Command\InitCommand;
|
||||
use Composer\Test\TestCase;
|
||||
|
||||
class InitCommandTest extends TestCase
|
||||
{
|
||||
function testParseValidAuthorString()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
$command->parseAuthorString('John Smith <john@example.com>');
|
||||
}
|
||||
|
||||
function testParseInvalidAuthorString()
|
||||
{
|
||||
$command = new InitCommand;
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
$command->parseAuthorString('');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue