GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: #33 update issue status · coding/coding-sdk-php@72530c2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tests/Acceptance
    • IssueTest.php
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tests/Acceptance/IssueTest.php‎

Copy file name to clipboardExpand all lines: tests/Acceptance/IssueTest.php
+15-3Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Coding\Core;
66
use Coding\Issue;
7+
use Coding\ProjectSetting;
78

89
class IssueTest extends TestCase
910
{
@@ -17,6 +18,7 @@ public function testCrud()
1718
];
1819

1920
$issue = new Issue($this->token);
21+
$projectSetting = new ProjectSetting($this->token);
2022
$result = $issue->create($data);
2123
$this->assertTrue(is_numeric($result['Code']));
2224

@@ -28,9 +30,19 @@ public function testCrud()
2830
$this->assertEquals($data['Name'], $result['Name']);
2931
$this->assertEmpty($result['StoryPoint']);
3032

31-
$params['StoryPoint'] = '1.0';
32-
$result = $issue->update($params);
33-
$this->assertEquals('1.0', $result['StoryPoint']);
33+
$statuses = $projectSetting->getIssueStatuses([
34+
'ProjectName' => $this->projectName,
35+
'IssueTypeId' => $result['IssueTypeId'],
36+
]);
37+
38+
$storyPoint = '1.0';
39+
$statusId = end($statuses)['IssueStatusId'];
40+
$result = $issue->update(array_merge($params, [
41+
'StoryPoint' => $storyPoint,
42+
'StatusId' => $statusId,
43+
]));
44+
$this->assertEquals($storyPoint, $result['StoryPoint']);
45+
$this->assertEquals($statusId, $result['IssueStatusId']);
3446

3547
$this->assertTrue($issue->delete($params));
3648
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.