From 42bbb84177c254b1dde530db13bafdbe7b46c709 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 14 Dec 2022 15:42:16 +0100 Subject: [PATCH] Migrate to `static` data providers using `rector/rector` --- Tests/AbstractAsciiTestCase.php | 2 +- Tests/FunctionsTest.php | 6 +++--- Tests/Inflector/EnglishInflectorTest.php | 4 ++-- Tests/Inflector/FrenchInflectorTest.php | 2 +- Tests/Slugger/AsciiSluggerTest.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/AbstractAsciiTestCase.php b/Tests/AbstractAsciiTestCase.php index a0cf206..d25fbde 100644 --- a/Tests/AbstractAsciiTestCase.php +++ b/Tests/AbstractAsciiTestCase.php @@ -110,7 +110,7 @@ public function testWordwrap($expected, $actual, $length, $break, $cut = false) $this->assertEquals($expected, $actual); } - public function wordwrapProvider() + public static function wordwrapProvider() { return [ [ diff --git a/Tests/FunctionsTest.php b/Tests/FunctionsTest.php index a721d85..6a69106 100644 --- a/Tests/FunctionsTest.php +++ b/Tests/FunctionsTest.php @@ -30,7 +30,7 @@ public function testS(AbstractString $expected, ?string $input) $this->assertEquals($expected, s($input)); } - public function provideSStrings(): array + public static function provideSStrings(): array { return [ [new UnicodeString(''), ''], @@ -50,7 +50,7 @@ public function testU(UnicodeString $expected, ?string $input) $this->assertEquals($expected, u($input)); } - public function provideUStrings(): array + public static function provideUStrings(): array { return [ [new UnicodeString(''), ''], @@ -68,7 +68,7 @@ public function testB(ByteString $expected, ?string $input) $this->assertEquals($expected, b($input)); } - public function provideBStrings(): array + public static function provideBStrings(): array { return [ [new ByteString(''), ''], diff --git a/Tests/Inflector/EnglishInflectorTest.php b/Tests/Inflector/EnglishInflectorTest.php index face92d..afe3b63 100644 --- a/Tests/Inflector/EnglishInflectorTest.php +++ b/Tests/Inflector/EnglishInflectorTest.php @@ -16,7 +16,7 @@ class EnglishInflectorTest extends TestCase { - public function singularizeProvider() + public static function singularizeProvider() { // see http://english-zone.com/spelling/plurals.html // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English @@ -166,7 +166,7 @@ public function singularizeProvider() ]; } - public function pluralizeProvider() + public static function pluralizeProvider() { // see http://english-zone.com/spelling/plurals.html // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English diff --git a/Tests/Inflector/FrenchInflectorTest.php b/Tests/Inflector/FrenchInflectorTest.php index 1d5bdac..530b027 100644 --- a/Tests/Inflector/FrenchInflectorTest.php +++ b/Tests/Inflector/FrenchInflectorTest.php @@ -16,7 +16,7 @@ class FrenchInflectorTest extends TestCase { - public function pluralizeProvider() + public static function pluralizeProvider() { return [ // Le pluriel par défaut diff --git a/Tests/Slugger/AsciiSluggerTest.php b/Tests/Slugger/AsciiSluggerTest.php index d58c002..89b5887 100644 --- a/Tests/Slugger/AsciiSluggerTest.php +++ b/Tests/Slugger/AsciiSluggerTest.php @@ -16,7 +16,7 @@ class AsciiSluggerTest extends TestCase { - public function provideSlugTests(): iterable + public static function provideSlugTests(): iterable { yield ['', '']; yield ['foo', ' foo '];