Skip to content

Commit

Permalink
Update PullRequestMergeCommandTest in order to set explicitly `"pat…
Browse files Browse the repository at this point in the history
…" => "none" for non interactive command executions
  • Loading branch information
phansys committed May 18, 2018
1 parent 0525ccf commit e00bcad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions tests/Command/PullRequest/PullRequestMergeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10],
['pr_number' => 10, '--pat' => 'none'],
['interactive' => false]
);

Expand Down Expand Up @@ -184,7 +184,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10, '--no-comments' => true],
['pr_number' => 10, '--no-comments' => true, '--pat' => 'none'],
['interactive' => false]
);

Expand Down Expand Up @@ -251,7 +251,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10, '--squash' => true, 'pr_type' => 'merge'],
['pr_number' => 10, '--squash' => true, 'pr_type' => 'merge', '--pat' => 'none'],
['interactive' => false]
);

Expand All @@ -275,7 +275,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10, '--force-squash' => true, 'pr_type' => 'merge'],
['pr_number' => 10, '--force-squash' => true, 'pr_type' => 'merge', '--pat' => 'none'],
['interactive' => false]
);

Expand Down Expand Up @@ -304,7 +304,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10, '--switch' => 'develop', 'pr_type' => 'merge'],
['pr_number' => 10, '--switch' => 'develop', 'pr_type' => 'merge', '--pat' => 'none'],
['interactive' => false]
);

Expand Down Expand Up @@ -343,7 +343,7 @@ function (HelperSet $helperSet) {
);

$tester->execute(
['pr_number' => 10, '--fast-forward' => true, 'pr_type' => 'merge'],
['pr_number' => 10, '--fast-forward' => true, 'pr_type' => 'merge', '--pat' => 'none'],
['interactive' => false]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ private function getTemplateHelper($pat = 'good_job')
->getMock()
;

$template->expects($this->once())
$template
->method('bindAndRender')
->with(['author' => 'weaverryan', 'pat' => $pat], 'pats', 'general')
->will($this->returnValue(self::$pats[$pat]))
->will($this->returnValueMap([[
['author' => 'weaverryan', 'pat' => $pat], 'pats', 'general', self::$pats[$pat],
]]))
;

return $template;
Expand Down

0 comments on commit e00bcad

Please sign in to comment.