Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793744
DeleteEventTest.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
DeleteEventTest.php
View Options
<?php
namespace
Nasqueron\Notifications\Tests\Analyzers\GitHub\Events
;
use
Nasqueron\Notifications\Analyzers\GitHub\Events\DeleteEvent
;
use
Nasqueron\Notifications\Tests\TestCase
;
class
DeleteEventTest
extends
TestCase
{
/**
* @var DeleteEvent
*/
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
DeleteEvent
(
$payload
);
parent
::
setUp
();
}
public
function
testNonExistingRefType
()
{
$this
->
assertSame
(
"Unknown delete 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, 22:47 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2435852
Default Alt Text
DeleteEventTest.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment