diff --git a/src/Api/ResourceIterationEvents.php b/src/Api/ResourceIterationEvents.php new file mode 100644 index 00000000..9112882b --- /dev/null +++ b/src/Api/ResourceIterationEvents.php @@ -0,0 +1,46 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Api; + +class ResourceIterationEvents extends AbstractApi +{ + /** + * @param int|string $project_id + * @param int $issue_iid + * + * @return mixed + */ + public function all($project_id, int $issue_iid) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_iteration_events'; + + return $this->get($this->getProjectPath($project_id, $path)); + } + + /** + * @param int|string $project_id + * @param int $issue_iid + * @param int $resource_iteration_event_id + * + * @return mixed + */ + public function show($project_id, int $issue_iid, int $resource_iteration_event_id) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_iteration_events/'; + $path .= self::encodePath($resource_iteration_event_id); + + return $this->get($this->getProjectPath($project_id, $path)); + } +} diff --git a/src/Api/ResourceLabelEvents.php b/src/Api/ResourceLabelEvents.php new file mode 100644 index 00000000..d0d8cd5e --- /dev/null +++ b/src/Api/ResourceLabelEvents.php @@ -0,0 +1,46 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Api; + +class ResourceLabelEvents extends AbstractApi +{ + /** + * @param int|string $project_id + * @param int $issue_iid + * + * @return mixed + */ + public function all($project_id, int $issue_iid) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_label_events'; + + return $this->get($this->getProjectPath($project_id, $path)); + } + + /** + * @param int|string $project_id + * @param int $issue_iid + * @param int $resource_label_event_id + * + * @return mixed + */ + public function show($project_id, int $issue_iid, int $resource_label_event_id) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_label_events/'; + $path .= self::encodePath($resource_label_event_id); + + return $this->get($this->getProjectPath($project_id, $path)); + } +} diff --git a/src/Api/ResourceMilestoneEvents.php b/src/Api/ResourceMilestoneEvents.php new file mode 100644 index 00000000..e7f2d19e --- /dev/null +++ b/src/Api/ResourceMilestoneEvents.php @@ -0,0 +1,46 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Api; + +class ResourceMilestoneEvents extends AbstractApi +{ + /** + * @param int|string $project_id + * @param int $issue_iid + * + * @return mixed + */ + public function all($project_id, int $issue_iid) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_milestone_events'; + + return $this->get($this->getProjectPath($project_id, $path)); + } + + /** + * @param int|string $project_id + * @param int $issue_iid + * @param int $resource_milestone_event_id + * + * @return mixed + */ + public function show($project_id, int $issue_iid, int $resource_milestone_event_id) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_milestone_events/'; + $path .= self::encodePath($resource_milestone_event_id); + + return $this->get($this->getProjectPath($project_id, $path)); + } +} diff --git a/src/Api/ResourceStateEvents.php b/src/Api/ResourceStateEvents.php new file mode 100644 index 00000000..511d1dce --- /dev/null +++ b/src/Api/ResourceStateEvents.php @@ -0,0 +1,46 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Api; + +class ResourceStateEvents extends AbstractApi +{ + /** + * @param int|string $project_id + * @param int $issue_iid + * + * @return mixed + */ + public function all($project_id, int $issue_iid) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_state_events'; + + return $this->get($this->getProjectPath($project_id, $path)); + } + + /** + * @param int|string $project_id + * @param int $issue_iid + * @param int $resource_label_event_id + * + * @return mixed + */ + public function show($project_id, int $issue_iid, int $resource_label_event_id) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_state_events/'; + $path .= self::encodePath($resource_label_event_id); + + return $this->get($this->getProjectPath($project_id, $path)); + } +} diff --git a/src/Api/ResourceWeightEvents.php b/src/Api/ResourceWeightEvents.php new file mode 100644 index 00000000..c2bd105a --- /dev/null +++ b/src/Api/ResourceWeightEvents.php @@ -0,0 +1,46 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Api; + +class ResourceWeightEvents extends AbstractApi +{ + /** + * @param int|string $project_id + * @param int $issue_iid + * + * @return mixed + */ + public function all($project_id, int $issue_iid) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_weight_events'; + + return $this->get($this->getProjectPath($project_id, $path)); + } + + /** + * @param int|string $project_id + * @param int $issue_iid + * @param int $resource_label_event_id + * + * @return mixed + */ + public function show($project_id, int $issue_iid, int $resource_label_event_id) + { + $path = 'issues/'.self::encodePath($issue_iid).'/resource_weight_events/'; + $path .= self::encodePath($resource_label_event_id); + + return $this->get($this->getProjectPath($project_id, $path)); + } +} diff --git a/src/Client.php b/src/Client.php index 242b5b61..9c1abdd3 100644 --- a/src/Client.php +++ b/src/Client.php @@ -33,6 +33,11 @@ use Gitlab\Api\Projects; use Gitlab\Api\Repositories; use Gitlab\Api\RepositoryFiles; +use Gitlab\Api\ResourceIterationEvents; +use Gitlab\Api\ResourceLabelEvents; +use Gitlab\Api\ResourceMilestoneEvents; +use Gitlab\Api\ResourceStateEvents; +use Gitlab\Api\ResourceWeightEvents; use Gitlab\Api\Schedules; use Gitlab\Api\Snippets; use Gitlab\Api\SystemHooks; @@ -218,6 +223,46 @@ public function issues(): Issues return new Issues($this); } + /** + * @return ResourceIterationEvents + */ + public function resourceIterationEvents(): ResourceIterationEvents + { + return new ResourceIterationEvents($this); + } + + /** + * @return ResourceLabelEvents + */ + public function resourceLabelEvents(): ResourceLabelEvents + { + return new ResourceLabelEvents($this); + } + + /** + * @return ResourceMilestoneEvents + */ + public function resourceMilestoneEvents(): ResourceMilestoneEvents + { + return new ResourceMilestoneEvents($this); + } + + /** + * @return ResourceStateEvents + */ + public function resourceStateEvents(): ResourceStateEvents + { + return new ResourceStateEvents($this); + } + + /** + * @return ResourceWeightEvents + */ + public function resourceWeightEvents(): ResourceWeightEvents + { + return new ResourceWeightEvents($this); + } + /** * @return IssuesStatistics */ diff --git a/tests/Api/ResourceIterationEventsTest.php b/tests/Api/ResourceIterationEventsTest.php new file mode 100644 index 00000000..f7b8e06f --- /dev/null +++ b/tests/Api/ResourceIterationEventsTest.php @@ -0,0 +1,141 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Tests\Api; + +use Gitlab\Api\ResourceIterationEvents; + +class ResourceIterationEventsTest extends TestCase +{ + /** + * @test + */ + public function shouldGetAllEvents(): void + { + $expectedArray = [ + [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'iteration' => [ + 'id' => 50, + 'iid' => 9, + 'group_id' => 5, + 'title' => 'Iteration I', + 'description' => 'Ipsum Lorem', + 'state' => 1, + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + ], + 'action' => 'add', + ], + [ + 'id' => 143, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-21T14=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'iteration' => [ + 'id' => 53, + 'iid' => 13, + 'group_id' => 5, + 'title' => 'Iteration II', + 'description' => 'Ipsum Lorem ipsum', + 'state' => 2, + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + ], + 'action' => 'remove', + ], + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_iteration_events', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->all(1, 253)); + } + + /** + * @test + */ + public function shouldShowEvent(): void + { + $expectedArray = [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'iteration' => [ + 'id' => 50, + 'iid' => 9, + 'group_id' => 5, + 'title' => 'Iteration I', + 'description' => 'Ipsum Lorem', + 'state' => 1, + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + ], + 'action' => 'add', + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_iteration_events/142', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->show(1, 253, 142)); + } + + /** + * @return string + */ + protected function getApiClass(): string + { + return ResourceIterationEvents::class; + } +} diff --git a/tests/Api/ResourceLabelEventsTest.php b/tests/Api/ResourceLabelEventsTest.php new file mode 100644 index 00000000..d65b25ec --- /dev/null +++ b/tests/Api/ResourceLabelEventsTest.php @@ -0,0 +1,123 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Tests\Api; + +use Gitlab\Api\ResourceLabelEvents; + +class ResourceLabelEventsTest extends TestCase +{ + /** + * @test + */ + public function shouldGetAllEvents(): void + { + $expectedArray = [ + [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'label' => [ + 'id' => 73, + 'name' => 'a1', + 'color' => '#34495E', + 'description' => '', + ], + 'action' => 'add', + ], + [ + 'id' => 143, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'label' => [ + 'id' => 74, + 'name' => 'p1', + 'color' => '#0033CC', + 'description' => '', + ], + 'action' => 'remove', + ], + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_label_events', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->all(1, 253)); + } + + /** + * @test + */ + public function shouldShowEvent(): void + { + $expectedArray = [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'label' => [ + 'id' => 73, + 'name' => 'a1', + 'color' => '#34495E', + 'description' => '', + ], + 'action' => 'add', + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_label_events/142', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->show(1, 253, 142)); + } + + /** + * @return string + */ + protected function getApiClass(): string + { + return ResourceLabelEvents::class; + } +} diff --git a/tests/Api/ResourceMilestoneEventsTest.php b/tests/Api/ResourceMilestoneEventsTest.php new file mode 100644 index 00000000..7b3699e6 --- /dev/null +++ b/tests/Api/ResourceMilestoneEventsTest.php @@ -0,0 +1,144 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Tests\Api; + +use Gitlab\Api\ResourceMilestoneEvents; + +class ResourceMilestoneEventsTest extends TestCase +{ + /** + * @test + */ + public function shouldGetAllEvents(): void + { + $expectedArray = [ + [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'milestone' => [ + 'id' => 61, + 'iid' => 9, + 'project_id' => 7, + 'title' => 'v1.2', + 'description' => 'Ipsum Lorem', + 'state' => 'active', + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + 'web_url' => 'http=>//gitlab.example.com=>3000/group/project/-/milestones/9', + ], + 'action' => 'add', + ], + [ + 'id' => 143, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-21T14=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'milestone' => [ + 'id' => 61, + 'iid' => 9, + 'project_id' => 7, + 'title' => 'v1.2', + 'description' => 'Ipsum Lorem', + 'state' => 'active', + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + 'web_url' => 'http=>//gitlab.example.com=>3000/group/project/-/milestones/9', + ], + 'action' => 'remove', + ], + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_milestone_events', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->all(1, 253)); + } + + /** + * @test + */ + public function shouldShowEvent(): void + { + $expectedArray = [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 253, + 'milestone' => [ + 'id' => 61, + 'iid' => 9, + 'project_id' => 7, + 'title' => 'v1.2', + 'description' => 'Ipsum Lorem', + 'state' => 'active', + 'created_at' => '2020-01-27T05=>07=>12.573Z', + 'updated_at' => '2020-01-27T05=>07=>12.573Z', + 'due_date' => null, + 'start_date' => null, + 'web_url' => 'http=>//gitlab.example.com=>3000/group/project/-/milestones/9', + ], + 'action' => 'add', + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_milestone_events/142', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->show(1, 253, 142)); + } + + /** + * @return string + */ + protected function getApiClass(): string + { + return ResourceMilestoneEvents::class; + } +} diff --git a/tests/Api/ResourceStateEventsTest.php b/tests/Api/ResourceStateEventsTest.php new file mode 100644 index 00000000..f3a5a119 --- /dev/null +++ b/tests/Api/ResourceStateEventsTest.php @@ -0,0 +1,105 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Tests\Api; + +use Gitlab\Api\ResourceStateEvents; + +class ResourceStateEventsTest extends TestCase +{ + /** + * @test + */ + public function shouldGetAllEvents(): void + { + $expectedArray = [ + [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 11, + 'state' => 'opened', + ], + [ + 'id' => 143, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-21T14=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 11, + 'state' => 'closed', + ], + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/11/resource_state_events', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->all(1, 11)); + } + + /** + * @test + */ + public function shouldShowEvent(): void + { + $expectedArray = [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'resource_type' => 'Issue', + 'resource_id' => 11, + 'state' => 'opened', + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/11/resource_state_events/142', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->show(1, 11, 142)); + } + + /** + * @return string + */ + protected function getApiClass(): string + { + return ResourceStateEvents::class; + } +} diff --git a/tests/Api/ResourceWeightEventsTest.php b/tests/Api/ResourceWeightEventsTest.php new file mode 100644 index 00000000..4d712a4a --- /dev/null +++ b/tests/Api/ResourceWeightEventsTest.php @@ -0,0 +1,102 @@ + + * (c) Graham Campbell + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Gitlab\Tests\Api; + +use Gitlab\Api\ResourceWeightEvents; + +class ResourceWeightEventsTest extends TestCase +{ + /** + * @test + */ + public function shouldGetAllEvents(): void + { + $expectedArray = [ + [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'issue_id' => 253, + 'weight' => 3, + ], + [ + 'id' => 143, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-21T14=>38=>20.077Z', + 'issue_id' => 253, + 'weight' => 2, + ], + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_weight_events', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->all(1, 253)); + } + + /** + * @test + */ + public function shouldShowEvent(): void + { + $expectedArray = [ + 'id' => 142, + 'user' => [ + 'id' => 1, + 'name' => 'Administrator', + 'username' => 'root', + 'state' => 'active', + 'avatar_url' => 'https=>//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + 'web_url' => 'http=>//gitlab.example.com/root', + ], + 'created_at' => '2018-08-20T13=>38=>20.077Z', + 'issue_id' => 253, + 'weight' => 3, + ]; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with('projects/1/issues/253/resource_weight_events/142', []) + ->willReturn($expectedArray); + + $this->assertEquals($expectedArray, $api->show(1, 253, 142)); + } + + /** + * @return string + */ + protected function getApiClass(): string + { + return ResourceWeightEvents::class; + } +}