From 7ef50ba63dccd0b63b709ca7484d2cece87b115a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 3 Jan 2022 17:24:33 +0100 Subject: [PATCH] Enhancement: Use data providers provided by ergebnis/data-provider --- psalm-baseline.xml | 5 ----- test/Unit/FileTest.php | 3 ++- test/Unit/HolderTest.php | 3 ++- test/Unit/TemplateTest.php | 3 ++- test/Util/DataProvider/Text.php | 31 ------------------------------- 5 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 test/Util/DataProvider/Text.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 3b6f67bf..9f18d03a 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -66,9 +66,4 @@ \Generator - - - \Generator - - diff --git a/test/Unit/FileTest.php b/test/Unit/FileTest.php index 81a8e975..28d65da3 100644 --- a/test/Unit/FileTest.php +++ b/test/Unit/FileTest.php @@ -53,7 +53,8 @@ protected function tearDown(): void } /** - * @dataProvider \Ergebnis\License\Test\Util\DataProvider\Text::blankOrEmptyString() + * @dataProvider \Ergebnis\DataProvider\StringProvider::blank() + * @dataProvider \Ergebnis\DataProvider\StringProvider::empty() */ public function testCreateRejectsBlankOrEmptyName(string $name): void { diff --git a/test/Unit/HolderTest.php b/test/Unit/HolderTest.php index edaf9e11..b99d7db6 100644 --- a/test/Unit/HolderTest.php +++ b/test/Unit/HolderTest.php @@ -30,7 +30,8 @@ final class HolderTest extends Framework\TestCase use Test\Util\Helper; /** - * @dataProvider \Ergebnis\License\Test\Util\DataProvider\Text::blankOrEmptyString() + * @dataProvider \Ergebnis\DataProvider\StringProvider::blank() + * @dataProvider \Ergebnis\DataProvider\StringProvider::empty() */ public function testFromStringRejectsBlankOrEmptyValue(string $value): void { diff --git a/test/Unit/TemplateTest.php b/test/Unit/TemplateTest.php index db200deb..7d2f0e6f 100644 --- a/test/Unit/TemplateTest.php +++ b/test/Unit/TemplateTest.php @@ -64,7 +64,8 @@ public function testFromStringReturnsTemplate(): void } /** - * @dataProvider \Ergebnis\License\Test\Util\DataProvider\Text::blankOrEmptyString() + * @dataProvider \Ergebnis\DataProvider\StringProvider::blank() + * @dataProvider \Ergebnis\DataProvider\StringProvider::empty() */ public function testFromFileRejectsBlankOrEmptyFileName(string $name): void { diff --git a/test/Util/DataProvider/Text.php b/test/Util/DataProvider/Text.php deleted file mode 100644 index 123c824f..00000000 --- a/test/Util/DataProvider/Text.php +++ /dev/null @@ -1,31 +0,0 @@ - ' ', - 'string-empty' => '', - ]; - - foreach ($values as $key => $value) { - yield $key => [ - $value, - ]; - } - } -}