getCommitMessage() public method

public getCommitMessage ( ) : string
return string
Exemplo n.º 1
0
 function it_runs_with_additional_modifiers(GrumPHP $grumPHP, GitCommitMsgContext $context)
 {
     $grumPHP->getTaskConfiguration('git_commit_message')->willReturn(['matchers' => ['/.*ümlaut/'], 'additional_modifiers' => 'u']);
     $context->getCommitMessage()->willReturn('message containing ümlaut');
     $result = $this->run($context);
     $result->shouldBeAnInstanceOf(TaskResultInterface::class);
     $result->isPassed()->shouldBe(true);
 }
Exemplo n.º 2
0
 function it_throws_exception_if_the_process_fails(GitCommitMsgContext $context)
 {
     $context->getCommitMessage()->willReturn('invalid');
     $this->shouldThrow('GrumPHP\\Exception\\RuntimeException')->duringRun($context);
 }
Exemplo n.º 3
0
 function it_runs_with_additional_modifiers(GrumPHP $grumPHP, GitCommitMsgContext $context)
 {
     $grumPHP->getTaskConfiguration('git_commit_message')->willReturn(array('matchers' => array('/.*ümlaut/'), 'additional_modifiers' => 'u'));
     $context->getCommitMessage()->willReturn('message containing ümlaut');
     $this->run($context);
 }