Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3777942
D3528.id9068.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D3528.id9068.diff
View Options
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,8 @@
"php": ">=5.6.0"
},
"require-dev": {
- "phpunit/phpunit": "5.0.*"
+ "php": ">=8.2.0",
+ "phpunit/phpunit": "11.*"
},
"autoload": {
"psr-4": {
diff --git a/tests/XHubSignatureTest.php b/tests/XHubSignatureTest.php
--- a/tests/XHubSignatureTest.php
+++ b/tests/XHubSignatureTest.php
@@ -1,14 +1,16 @@
-<?php
+<?php declare(strict_types=1);
+
+use PHPUnit\Framework\TestCase;
use Keruald\GitHub\XHubSignature;
require 'XHubSignatureConstants.php';
-class XHubSignatureTest extends PHPUnit_Framework_TestCase {
+class XHubSignatureTest extends TestCase {
protected $defaultInstance;
protected $tigerInstance;
- protected function setUp() {
+ protected function setUp() : void {
$this->defaultInstance = new XHubSignature(SECRET);
$this->tigerInstance = new XHubSignature(SECRET, TIGER_ALGO);
@@ -16,7 +18,7 @@
$this->tigerInstance->payload = TIGER_PAYLOAD;
}
- public function testValidate () {
+ public function testValidate () : void {
$this->defaultInstance->signature = "";
$this->assertFalse($this->defaultInstance->validate());
@@ -27,7 +29,7 @@
$this->assertTrue($this->defaultInstance->validate());
}
- public function testCompute () {
+ public function testCompute () : void {
$this->assertSame(
DEFAULT_SIGNATURE,
$this->defaultInstance->compute()
@@ -43,10 +45,8 @@
/// Test static helper methods
///
- /**
- * @covers XHubSignature::validatePayload
- */
- public function testhashPayload () {
+ #[CoversFunction(XHubSignature::validatePayload)]
+ public function testhashPayload () : void {
$this->assertSame(
EMPTY_DEFAULT_HASH_ALGO_SIGNATURE,
XHubSignature::hashPayload("", "")
@@ -57,10 +57,8 @@
);
}
- /**
- * @covers XHubSignature::validatePayload
- */
- public function testValidatePayload () {
+ #[CoversFunction(XHubSignature::validatePayload)]
+ public function testValidatePayload () : void {
$this->assertFalse(XHubSignature::validatePayload("", "", ""));
$this->assertTrue(XHubSignature::validatePayload(
@@ -71,7 +69,7 @@
));
}
- public function testParseSignature () {
+ public function testParseSignature () : void {
$this->assertSame(
TIGER_SIGNATURE,
XHubSignature::parseSignature(TIGER_SIGNATURE)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 03:18 (1 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263827
Default Alt Text
D3528.id9068.diff (2 KB)
Attached To
Mode
D3528: Update tests to PHPUnit 11
Attached
Detach File
Event Timeline
Log In to Comment