Skip to content

Commit

Permalink
chore: make dataproviders static for phpunit 10 (#2622)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris53897 authored Jun 19, 2023
1 parent 2ed66e3 commit 95bc3c8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/Gedmo/Mapping/Annotation/AnnotationArgumentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testArguments(array $expected, string $class, array $args, ?stri
}
}

public function getGedmoAnnotations(): iterable
public static function getGedmoAnnotations(): iterable
{
yield 'args_without_data' => [['on' => 'delete', 'field' => 'some'], Blameable::class, [[], 'delete', 'some']];
yield 'default_values_without_args' => [['on' => 'update', 'field' => null, 'value' => null], Blameable::class, []];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testLoadFromDoctrineAnnotation(string $annotationProperty, $expe
static::assertSame($annotation->$annotationProperty, $expectedReturn);
}

abstract public function getValidParameters(): iterable;
abstract public static function getValidParameters(): iterable;

abstract protected function getAnnotationClass(): string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class TranslationEntityTestCase extends BaseClassAnnotationTestCase
{
public function getValidParameters(): iterable
public static function getValidParameters(): iterable
{
return [
['class', \stdClass::class],
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Tree/ClosureTreeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public function testClosuresCreatedMustNotBeAffectedByPersistOrder(Category $fir
static::assertCount(6, $closures);
}

public function provideNodeOrders(): array
public static function provideNodeOrders(): array
{
$grandpa = new Category();
$grandpa->setTitle('grandpa');
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Tree/NestedTreeRootRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function testGetPathAsStringWithInvalidStringMethod($stringMethod): void
]);
}

public function invalidStringMethods(): iterable
public static function invalidStringMethods(): iterable
{
yield [null];
yield [123];
Expand Down
6 changes: 3 additions & 3 deletions tests/Gedmo/Uploadable/UploadableEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public function testRemoveFileIfItsNotAFileThenReturnFalse(): void
static::assertFalse($this->listener->removeFile('non_existent_file'));
}

public function dataProvider_testMoveFileUsingAppendNumberOptionAppendsNumberToFilenameIfItAlreadyExists(): array
public static function dataProvider_testMoveFileUsingAppendNumberOptionAppendsNumberToFilenameIfItAlreadyExists(): array
{
return [
'With extension' => [
Expand Down Expand Up @@ -741,7 +741,7 @@ public function testUseGeneratedFilenameWhenAppendingNumbers(): void
}

// Data Providers
public function invalidFileInfoClassesProvider(): array
public static function invalidFileInfoClassesProvider(): array
{
return [
[''],
Expand All @@ -753,7 +753,7 @@ public function invalidFileInfoClassesProvider(): array
];
}

public function uploadExceptionsProvider(): array
public static function uploadExceptionsProvider(): array
{
return [
[1, UploadableIniSizeException::class],
Expand Down

0 comments on commit 95bc3c8

Please sign in to comment.