Skip to content

Commit 077b001

Browse files
Merge branch '9.19' into 10.0
2 parents f7feca5 + a62f48c commit 077b001

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ CHANGE LOG
22
==========
33

44

5+
## 10.0.0 (UPCOMING)
6+
7+
* No changes since RC2
8+
9+
510
## 10.0.0-RC2 (23/07/2020)
611

712
* Restored 9.x behaviour for empty JSON responses

src/Api/Issues.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ public function update($project_id, int $issue_iid, array $params)
9090
return $this->put($this->getProjectPath($project_id, 'issues/'.self::encodePath($issue_iid)), $params);
9191
}
9292

93+
/**
94+
* @param int|string $project_id
95+
* @param int $issue_iid
96+
* @param array $params
97+
*
98+
* @return mixed
99+
*/
100+
public function reorder($project_id, $issue_iid, array $params)
101+
{
102+
return $this->put($this->getProjectPath($project_id, 'issues/'.$this->encodePath($issue_iid)).'/reorder', $params);
103+
}
104+
93105
/**
94106
* @param int|string $project_id
95107
* @param int $issue_iid

tests/Api/IssuesTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,21 @@ public function shouldUpdateIssue()
179179
$this->assertEquals($expectedArray, $api->update(1, 2, ['title' => 'A renamed issue', 'labels' => 'foo']));
180180
}
181181

182+
/**
183+
* @test
184+
*/
185+
public function shouldReorderIssue()
186+
{
187+
$expectedArray = ['id' => 2, 'title' => 'A reordered issue'];
188+
$api = $this->getApiMock();
189+
$api->expects($this->once())
190+
->method('put')
191+
->with('projects/1/issues/2/reorder', ['move_after_id' => 3, 'move_before_id' => 4])
192+
->will($this->returnValue($expectedArray))
193+
;
194+
$this->assertEquals($expectedArray, $api->reorder(1, 2, ['move_after_id' => 3, 'move_before_id' => 4]));
195+
}
196+
182197
/**
183198
* @test
184199
*/

0 commit comments

Comments
 (0)