Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make dataproviders static for phpunit 10 #2622

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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