From cdb5813b64ca5be37f524b25d28327d445f4a1a8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kondas Date: Sat, 7 Dec 2024 20:29:10 +0100 Subject: [PATCH] bump phpunit to 10 --- composer.json | 2 +- phpunit.xml | 32 +++++++++++++------------------- tests/TupleTest.php | 10 +++++----- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index da77a41..958b3e2 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.27", "nette/php-generator": "^4.0", - "phpunit/phpunit": "^9.6.13", + "phpunit/phpunit": "^10.5", "phpstan/phpstan": "^2.0" }, "autoload": { diff --git a/phpunit.xml b/phpunit.xml index 41ae599..8b41f35 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,22 +1,16 @@ - - - src - - - - - tests - - + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" + executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" colors="true" + cacheDirectory=".phpunit.cache" beStrictAboutCoverageMetadata="true"> + + + tests + + + + + src + + diff --git a/tests/TupleTest.php b/tests/TupleTest.php index 41bed64..8965c7b 100644 --- a/tests/TupleTest.php +++ b/tests/TupleTest.php @@ -22,7 +22,7 @@ public function testTupleArity(array $values, int $arity): void self::assertEquals($arity, Tuple::of(...$values)->arity()); } - public function arityTestData(): array + public static function arityTestData(): array { return [ [['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], 8], @@ -69,7 +69,7 @@ public function testTupleToArray(array $values): void self::assertEquals($values, Tuple::of(...$values)->toArray()); } - public function toArrayTestData(): array + public static function toArrayTestData(): array { return [ [['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']], @@ -97,7 +97,7 @@ public function testTupleConcat(array $firstValues, array $secondValues, string self::assertEquals($result, $newTuple->toArray()); } - public function concatTestData(): array + public static function concatTestData(): array { return TupleConcatTestHelper::concatTestData(); } @@ -119,7 +119,7 @@ public function testTupleAppend(array $expected, array $values, string $appendVa self::assertEquals($expected, Tuple::of(...$values)->append($appendValue)->toArray()); } - public function appendTestData(): array + public static function appendTestData(): array { return [ [['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], ['a', 'b', 'c', 'd', 'e', 'f', 'g'], 'h'], @@ -141,7 +141,7 @@ public function testTuplePrepend(array $expected, array $values, string $appendV self::assertEquals($expected, Tuple::of(...$values)->prepend($appendValue)->toArray()); } - public function prependTestData(): array + public static function prependTestData(): array { return [ [['h', 'a', 'b', 'c', 'd', 'e', 'f', 'g'], ['a', 'b', 'c', 'd', 'e', 'f', 'g'], 'h'],