Skip to content

Commit

Permalink
DEP Use PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 6, 2024
1 parent 3792144 commit 673826e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"silverstripe/mimevalidator": "^4"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^11.3",
"squizlabs/php_codesniffer": "^3",
"silverstripe/documentation-lint": "^1",
"silverstripe/standards": "^1",
Expand Down
6 changes: 3 additions & 3 deletions tests/php/Control/UserDefinedFormControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public function testEmailAttachmentMaximumSizeCanBeConfigured()
$this->assertSame(5 * 1024 * 1024, $udfController->getMaximumAllowedEmailAttachmentSize());
}

public function getParseByteSizeStringTestValues()
public static function getParseByteSizeStringTestValues()
{
return [
['9846', 9846],
Expand Down Expand Up @@ -558,7 +558,7 @@ public function testParseByteSizeString($input, $expectedOutput)
$this->assertSame($expectedOutput, $controller->convertSizeStringToBytes($input));
}

public function getParseByteSizeStringTestBadValues()
public static function getParseByteSizeStringTestBadValues()
{
return [
['1234b'],
Expand All @@ -582,7 +582,7 @@ public function testParseByteSizeStringBadValuesThrowException($input)
$controller->convertSizeStringToBytes($input);
}

public function provideValidEmailsToArray()
public static function provideValidEmailsToArray()
{
return [
[[], [null]],
Expand Down
4 changes: 2 additions & 2 deletions tests/php/Form/UserFormsRequiredFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testUsesUserFormsRequiredFieldsValidator()
$this->assertInstanceOf(UserFormsRequiredFields::class, $validator, 'Uses UserFormsRequiredFields validator');
}

public function dataProviderValidationOfConditionalRequiredFields()
public static function dataProviderValidationOfConditionalRequiredFields()
{
return [
'Passes when non-conditional required field has a value' => [
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testValidationOfConditionalRequiredFields($data, $expected)
$this->assertEquals($expected, $validator->php($data));
}

public function dataProviderValidationOfNestedConditionalRequiredFields()
public static function dataProviderValidationOfNestedConditionalRequiredFields()
{
return [
'Fails when non-conditional required field is empty' => [[], false],
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Model/EditableCustomRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function testToggleDisplayEvent()
$this->assertSame('userform.field.hide', $rule1->toggleDisplayEvent('hide', true));
}

public function dataProviderValidateAgainstFormData()
public static function dataProviderValidateAgainstFormData()
{
return [
'IsNotBlank with blank value' =>
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Model/EditableFormFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function testGetIcon()
$this->assertStringContainsString('/images/editabletextfield.png', $field->getIcon());
}

public function displayedProvider()
public static function displayedProvider()
{
$one = ['basic_text_name' => 'foobar'];
$two = array_merge($one, ['basic_text_name_2' => 'foobar']);
Expand Down

0 comments on commit 673826e

Please sign in to comment.