public testCanParseMessagesWithAnExtendedBody ( ) |
public function testCanParseMessagesWithAnExtendedBody()
{
$title = "chore(test): Summary";
$body = <<<___MSG
Optional body
Fixes #123, #456
Refs #789
___MSG;
$text = "{$title}\n{$body}";
$msg = new CommitMessage($text);
$this->assertTrue($msg->isValidFormat());
$this->assertSame('chore', $msg->getPart('type'));
$this->assertSame('test', $msg->getPart('component'));
$this->assertSame('Summary', $msg->getPart('summary'));
$this->assertSame($body, $msg->getPart('body'));
}