parseAuthorString('John Smith '); $this->assertEquals('John Smith', $author['name']); $this->assertEquals('john@example.com', $author['email']); } function testParseEmptyAuthorString() { $command = new InitCommand; $this->setExpectedException('InvalidArgumentException'); $command->parseAuthorString(''); } function testParseAuthorStringWithInvalidEmail() { $command = new InitCommand; $this->setExpectedException('InvalidArgumentException'); $command->parseAuthorString('John Smith '); } }