Skip to content

Commit 49b85f7

Browse files
committed
テスト追加
1 parent 0f78fa5 commit 49b85f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
1818
public function api_client(){
1919
$key = getenv('backlog_api_key');
2020
$space = getenv('backlog_space');
21-
return new BacklogAPIClient($space, $key);
21+
$api = new BacklogAPIClient($space, $key);
22+
$api->enableLogging();
23+
return $api;
2224
}
2325
public function model_client(){
2426
$key = getenv('backlog_api_key');

tests/Unit/Api/BacklogApiCallTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,11 @@ public function test_issue_attachment_is_not_same_get_attachment() {
9898
$this->assertHasProperties(['name','size'],$list[0]);
9999
$this->assertEquals($list[0]->size, strlen($attachment));
100100
}
101+
public function test_issue_search_by_issue_id(){
102+
$issue_a = $this->api_client()->getIssueList(['count'=>1])[0];
103+
$issue_b = $this->api_client()->getIssueList(['projectId'=>[$issue_a->projectId]])[0];
104+
$this->assertEquals($issue_b->id,$issue_a->id);
105+
$this->assertEquals($issue_b,$issue_a);
106+
}
101107

102108
}

0 commit comments

Comments
 (0)