From 9a87141d88ca0d91b7a9145110009a131bf9b36a Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Mon, 19 Aug 2024 15:19:55 +0200 Subject: [PATCH] mark all phpunit provider as Static --- CHANGELOG.md | 3 +++ .../FactoryType/EntityFieldEntityReferenceFactoryTypeTest.php | 4 ++-- tests/src/Kernel/FactoryType/EntityFieldFactoryTypeTest.php | 4 ++-- tests/src/Kernel/FactoryType/FileFactoryTypeTest.php | 2 +- tests/src/Kernel/FactoryType/MediaFactoryTypeTest.php | 2 +- tests/src/Kernel/FactoryType/MediaTypeFactoryTypeTest.php | 2 +- tests/src/Kernel/FactoryType/NodeFactoryTypeTest.php | 2 +- tests/src/Kernel/FactoryType/TaxonomyTermFactoryTypeTest.php | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae28631..2cb6b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - remove legacy version annotation on docker-compose.yml +### Changed +- mark all phpunit provider as Static + ## [1.2.1] - 2024-05-31 ### Removed - drop tests support on Drupal <= 9.4 diff --git a/tests/src/Kernel/FactoryType/EntityFieldEntityReferenceFactoryTypeTest.php b/tests/src/Kernel/FactoryType/EntityFieldEntityReferenceFactoryTypeTest.php index 5678f15..18370ad 100644 --- a/tests/src/Kernel/FactoryType/EntityFieldEntityReferenceFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/EntityFieldEntityReferenceFactoryTypeTest.php @@ -248,7 +248,7 @@ public function testCreateRandomTitle(): void { * @return array * Data provided. */ - public function providerTaxonomyFieldValues(): array { + public static function providerTaxonomyFieldValues(): array { return [ 'Test content entity reference' => [ [ @@ -342,7 +342,7 @@ public function providerTaxonomyFieldValues(): array { * @return array * Data provided. */ - public function providerNodeFieldValues(): array { + public static function providerNodeFieldValues(): array { return [ 'Test content entity reference' => [[ 'entity_type' => 'node', diff --git a/tests/src/Kernel/FactoryType/EntityFieldFactoryTypeTest.php b/tests/src/Kernel/FactoryType/EntityFieldFactoryTypeTest.php index 6ea7944..4a87f9e 100644 --- a/tests/src/Kernel/FactoryType/EntityFieldFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/EntityFieldFactoryTypeTest.php @@ -248,7 +248,7 @@ public function testCreateRandomTitle(): void { * @return array * Data provided. */ - public function providerTaxonomyFieldValues(): array { + public static function providerTaxonomyFieldValues(): array { return [ 'text field' => [ [ @@ -339,7 +339,7 @@ public function providerTaxonomyFieldValues(): array { * @return array * Data provided. */ - public function providerNodeFieldValues(): array { + public static function providerNodeFieldValues(): array { return [ 'text field' => [ [ diff --git a/tests/src/Kernel/FactoryType/FileFactoryTypeTest.php b/tests/src/Kernel/FactoryType/FileFactoryTypeTest.php index cbfde81..010d2a9 100644 --- a/tests/src/Kernel/FactoryType/FileFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/FileFactoryTypeTest.php @@ -199,7 +199,7 @@ public function testCreateGetAutomaticFilename(): void { * @return array * Data provided. */ - public function providerFileValues(): array { + public static function providerFileValues(): array { return [ '.txt' => [ 'html-1.txt', diff --git a/tests/src/Kernel/FactoryType/MediaFactoryTypeTest.php b/tests/src/Kernel/FactoryType/MediaFactoryTypeTest.php index bf70bff..cd6f4c6 100644 --- a/tests/src/Kernel/FactoryType/MediaFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/MediaFactoryTypeTest.php @@ -90,7 +90,7 @@ public function testCreateMediaTypeMustExists(): void { * @return array * Data provided. */ - public function providerMediaValues(): array { + public static function providerMediaValues(): array { return [ 'published media file' => [ [ diff --git a/tests/src/Kernel/FactoryType/MediaTypeFactoryTypeTest.php b/tests/src/Kernel/FactoryType/MediaTypeFactoryTypeTest.php index 600d433..4483d5f 100644 --- a/tests/src/Kernel/FactoryType/MediaTypeFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/MediaTypeFactoryTypeTest.php @@ -130,7 +130,7 @@ public function testCreateRandomId(): void { * @return array * Data provided. */ - public function providerMediaTypeValues(): array { + public static function providerMediaTypeValues(): array { return [ 'media File type' => [ [ diff --git a/tests/src/Kernel/FactoryType/NodeFactoryTypeTest.php b/tests/src/Kernel/FactoryType/NodeFactoryTypeTest.php index b2333fb..bc9eb67 100644 --- a/tests/src/Kernel/FactoryType/NodeFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/NodeFactoryTypeTest.php @@ -88,7 +88,7 @@ public function testCreateRandomTitle(): void { * @return array * Data provided. */ - public function providerNodeValues(): array { + public static function providerNodeValues(): array { return [ 'published node' => [ [ diff --git a/tests/src/Kernel/FactoryType/TaxonomyTermFactoryTypeTest.php b/tests/src/Kernel/FactoryType/TaxonomyTermFactoryTypeTest.php index e8625b3..63ee9ce 100644 --- a/tests/src/Kernel/FactoryType/TaxonomyTermFactoryTypeTest.php +++ b/tests/src/Kernel/FactoryType/TaxonomyTermFactoryTypeTest.php @@ -112,7 +112,7 @@ public function testCreateRandomTitle(): void { * @return array * Data provided. */ - public function providerValues(): array { + public static function providerValues(): array { return [ 'published taxonomy term' => [ [