Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793358
CreateEventTest.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
CreateEventTest.php
View Options
<?php
namespace
Nasqueron\Notifications\Tests\Analyzers\GitHub\Events
;
use
Nasqueron\Notifications\Analyzers\GitHub\Events\CreateEvent
;
use
Nasqueron\Notifications\Tests\TestCase
;
class
CreateEventTest
extends
TestCase
{
/**
* @var CreateEvent
*/
private
$event
;
public
function
setUp
()
{
$payload
=
new
\stdClass
;
$payload
->
repository
=
new
\stdClass
;
$payload
->
repository
->
full_name
=
'baxterthehacker/public-repo'
;
$payload
->
repository
->
html_url
=
'https://github.com/baxterthehacker/public-repo'
;
$payload
->
ref_type
=
'bookmark'
;
$payload
->
ref
=
'quux'
;
$this
->
event
=
new
CreateEvent
(
$payload
);
parent
::
setUp
();
}
public
function
testNonExistingRefType
()
{
$this
->
assertSame
(
"Unknown create reference: bookmark quux"
,
$this
->
event
->
getDescription
()
);
}
/**
* @expectedException InvalidArgumentException
*/
public
function
testNonExistingRefTypeLinkException
()
{
$this
->
event
->
getLink
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:45 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2436179
Default Alt Text
CreateEventTest.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment