Skip to content

Commit 635c638

Browse files
committed
Make PHPUnit 10 compatible
1 parent 30f0589 commit 635c638

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"simplesamlphp/composer-module-installer": "~1.0"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^9.0",
29+
"phpunit/phpunit": "^9.0 | ^10.0",
3030
"squizlabs/php_codesniffer": "^3.0"
3131
},
3232
"autoload-dev": {

tests/DrupalHelperTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setUp(): void
2424
}
2525

2626

27-
public function getPropertyNameProvider(): array
27+
public static function getPropertyNameProvider(): array
2828
{
2929
return [
3030
[[], 'value'],
@@ -46,7 +46,7 @@ public function testGetPropertyName($attribute_definition, $expected_property_na
4646
}
4747

4848

49-
public function getAttributeNameProvider(): array
49+
public static function getAttributeNameProvider(): array
5050
{
5151
return [
5252
[['field_name' => 'some_field'], 'some_field:value'],
@@ -73,7 +73,7 @@ public function testGetAttributeName($attribute_definition, $expected_attribute_
7373
$this->assertEquals($expected_attribute_name, $attribute_name, 'Expected attribute name returned');
7474
}
7575

76-
public function getAllAttributesDataProvider(): array
76+
public static function getAllAttributesDataProvider(): array
7777
{
7878
return [
7979
// Set #0.
@@ -180,7 +180,7 @@ public function testGetAllAttributes($values, $forbidden_attributes, $expected_a
180180
$this->assertEquals($expected_attributes, $attributes, 'Expected attributes returned');
181181
}
182182

183-
public function getAttributesDataProvider(): array
183+
public static function getAttributesDataProvider(): array
184184
{
185185
$field_values = [
186186
'field_name' => [

tests/UserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class UserTest extends TestCase
1212
{
1313

14-
public function userDataProvider()
14+
public static function userDataProvider()
1515
{
1616
return [
1717
[
@@ -58,7 +58,7 @@ public function testUser($values, $count)
5858
$this->assertEquals($count, count($user->getIterator()), 'Returned expected quantity of fields');
5959
}
6060

61-
public function userHasFieldDataProvider()
61+
public static function userHasFieldDataProvider()
6262
{
6363
return [
6464
[

0 commit comments

Comments
 (0)