Преглед изворни кода

Test parseAuthorString() actual result

Francesc Rosàs пре 12 година
родитељ
комит
7c273d1ee4
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      tests/Composer/Test/Command/InitCommandTest.php

+ 3 - 1
tests/Composer/Test/Command/InitCommandTest.php

@@ -10,7 +10,9 @@ class InitCommandTest extends TestCase
     function testParseValidAuthorString()
     {
         $command = new InitCommand;
-        $command->parseAuthorString('John Smith <john@example.com>');
+        $author = $command->parseAuthorString('John Smith <john@example.com>');
+        $this->assertEquals('John Smith', $author['name']);
+        $this->assertEquals('john@example.com', $author['email']);
     }
 
     function testParseEmptyAuthorString()