InitCommandTest.php 507 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Composer\Test\Autoload;
  3. use Composer\Command\InitCommand;
  4. use Composer\Test\TestCase;
  5. class InitCommandTest extends TestCase
  6. {
  7. function testParseValidAuthorString()
  8. {
  9. $command = new InitCommand;
  10. $command->parseAuthorString('John Smith <john@example.com>');
  11. }
  12. function testParseInvalidAuthorString()
  13. {
  14. $command = new InitCommand;
  15. $this->setExpectedException('InvalidArgumentException');
  16. $command->parseAuthorString('');
  17. }
  18. }