Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793706
DockerHubNotificationTest.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
DockerHubNotificationTest.php
View Options
<?php
namespace
Nasqueron\Notifications\Tests\Notifications
;
use
Nasqueron\Notifications\Notifications\DockerHubNotification
;
use
Nasqueron\Notifications\Tests\TestCase
;
class
DockerHubNotificationTest
extends
TestCase
{
/**
* @var Nasqueron\Notifications\Notifications\DockerHubNotification
*/
private
$notification
;
/**
* @var stdClass
*/
private
$payload
;
public
function
setUp
()
{
$path
=
__DIR__
.
'/../data/payloads/DockerHubPushPayload.json'
;
$this
->
payload
=
json_decode
(
file_get_contents
(
$path
));
$this
->
notification
=
new
DockerHubNotification
(
"Acme"
,
"push"
,
$this
->
payload
);
}
public
function
testProperties
()
{
$this
->
assertEquals
(
"DockerHub"
,
$this
->
notification
->
service
);
$this
->
assertEquals
(
"Acme"
,
$this
->
notification
->
project
);
$this
->
assertEquals
(
"docker"
,
$this
->
notification
->
group
);
$this
->
assertEquals
(
$this
->
payload
,
$this
->
notification
->
rawContent
);
$this
->
assertEquals
(
"push"
,
$this
->
notification
->
type
);
$this
->
assertEquals
(
"New image pushed to Docker Hub registry for svendowideit/testhook by trustedbuilder"
,
$this
->
notification
->
text
);
$this
->
assertEquals
(
"https://registry.hub.docker.com/u/svendowideit/testhook/"
,
$this
->
notification
->
link
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 22:47 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2440035
Default Alt Text
DockerHubNotificationTest.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment