Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25243586
IssueCommentEventTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
IssueCommentEventTest.php
View Options
<?php
namespace
Nasqueron\Notifications\Tests\Analyzers\GitHub\Events
;
use
Nasqueron\Notifications\Analyzers\GitHub\Events\IssueCommentEvent
;
use
Nasqueron\Notifications\Tests\TestCase
;
class
IssueCommentEventTest
extends
TestCase
{
/**
* @var \stdClass
*/
private
$payload
;
public
function
setUp
()
{
$filename
=
__DIR__
.
"/../../../data/payloads/GitHubEvents/issue_comment.json"
;
$this
->
payload
=
json_decode
(
file_get_contents
(
$filename
));
parent
::
setUp
();
}
/**
* @dataProvider payloadDescriptionProvider
*/
public
function
testWhenRepositoryPerAction
(
$action
,
$description
)
{
$this
->
payload
->
action
=
$action
;
$event
=
new
IssueCommentEvent
(
$this
->
payload
);
$this
->
assertSame
(
$description
,
$event
->
getDescription
());
}
/**
* Provides actions and descritions for testWhenRepositoryPerAction
*
* See https://developer.github.com/v3/activity/events/types/#issuecommentevent
*/
public
function
payloadDescriptionProvider
()
{
return
[
[
'created'
,
"baxterthehacker added a comment to issue #2 — Spelling error in the README file: You are totally right! I'll get this fixed right away."
],
[
'edited'
,
"baxterthehacker edited a comment to issue #2 — Spelling error in the README file: You are totally right! I'll get this fixed right away."
],
[
'deleted'
,
"baxterthehacker deleted a comment to issue #2 — Spelling error in the README file"
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Apr 9, 01:57 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3603413
Default Alt Text
IssueCommentEventTest.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment