Test InitCommand::parseAuthorString()
parent
e4b48d39d0
commit
e3b9dd10c2
|
@ -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…
Reference in New Issue