-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #522 avoiding $emailAddress property accessed before initializa…
…tion error.
- Loading branch information
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"reporter": { | ||
"self": "https://jira.example.com/rest/api/2/user?username=lesstif", | ||
"name": "lesstif", | ||
"key": "lesstif", | ||
"avatarUrls": { | ||
"48x48": "https://secure.gravatar.com/avatar/9f1705ef1d8c977eba04f00556e02922?d=mm&s=48", | ||
"24x24": "https://secure.gravatar.com/avatar/9f1705ef1d8c977eba04f00556e02922?d=mm&s=24", | ||
"16x16": "https://secure.gravatar.com/avatar/9f1705ef1d8c977eba04f00556e02922?d=mm&s=16", | ||
"32x32": "https://secure.gravatar.com/avatar/9f1705ef1d8c977eba04f00556e02922?d=mm&s=32" | ||
}, | ||
"displayName": "정광섭", | ||
"active": true, | ||
"timeZone": "Asia/Seoul" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php declare(strict_types=1); | ||
|
||
namespace JiraRestApi\Test; | ||
|
||
|
@@ -89,4 +89,17 @@ public function testIssue() | |
|
||
} | ||
|
||
public function testReporterField() | ||
{ | ||
$ret = file_get_contents('test-data/reporter-no-email-address.json'); | ||
|
||
$reporter = $this->mapper->map( | ||
json_decode($ret), new Reporter() | ||
); | ||
|
||
$this->assertInstanceOf(Reporter::class, $reporter); | ||
|
||
$this->assertEquals('[email protected]', $reporter->emailAddress); | ||
} | ||
|
||
} |