Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56315765
XHubSignature256Test.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
885 B
Referenced Files
None
Subscribers
None
XHubSignature256Test.php
View Options
<?php
declare
(
strict_types
=
1
);
use
PHPUnit\Framework\TestCase
;
use
Keruald\GitHub\XHubSignature256
;
require
'XHubSignatureConstants.php'
;
class
XHubSignature256Test
extends
TestCase
{
protected
XHubSignature256
$instance
;
protected
function
setUp
()
:
void
{
$this
->
instance
=
new
XHubSignature256
(
DEFAULT_256_SECRET
);
$this
->
instance
->
payload
=
DEFAULT_256_PAYLOAD
;
}
///
/// Tests
///
public
function
testValidate
()
:
void
{
$this
->
instance
->
signature
=
DEFAULT_256_SIGNATURE
;
$this
->
assertTrue
(
$this
->
instance
->
validate
());
}
///
/// Test static helper methods
///
public
function
testValidatePayload
()
:
void
{
$this
->
assertTrue
(
XHubSignature256
::
validatePayload
(
DEFAULT_256_SECRET
,
DEFAULT_256_PAYLOAD
,
DEFAULT_256_SIGNATURE
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 6, 23:10 (1 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4207670
Default Alt Text
XHubSignature256Test.php (885 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment