stable

Clone or download

Read-only

Add unit tests for PATCH status in pull requests

This is part of request #13715 Pull request requires WRITE on destination branch to be Abandonned The status patch operation has been moved to a dedicated object to be able to be unit tested. In addition, we done a little correction in the logical part of checkUserCanAbandon method (both references are now provided). A patch dedicated to some refactoring will be done after. Change-Id: Ic55e8c5b8276f2e180f7f113c9b7131cfd98aed2

Modified Files

Name
M plugins/pullrequest/include/PullRequest/PullRequestCloser.php +7 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/PullRequestMerger.php +3 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php +25 −67 Go to diff View file
A plugins/pullrequest/include/PullRequest/REST/v1/StatusPatcher.php +178 −0 Go to diff View file
A plugins/pullrequest/phpunit/REST/v1/StatusPatcherTest.php +460 −0 Go to diff View file