diff --git a/composer.json b/composer.json index edfc481..316bf2c 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require": { "php": ">=8.1", "amphp/amp": "^3", - "phpunit/phpunit": "^9", + "phpunit/phpunit": "^10", "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c8b5fad..df19de9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,17 @@ - - - - test - - - test - - - - - src - - + + + + test + + + test + + + + + + src + + diff --git a/src/AsyncTestCase.php b/src/AsyncTestCase.php index 9bdcf93..2eb0dde 100644 --- a/src/AsyncTestCase.php +++ b/src/AsyncTestCase.php @@ -27,15 +27,6 @@ abstract class AsyncTestCase extends PHPUnitTestCase private bool $setUpInvoked = false; - /** - * @codeCoverageIgnore Invoked before code coverage data is being collected. - */ - final public function setName(string $name): void - { - parent::setName($name); - $this->realTestName = $name; - } - protected function setUp(): void { $this->setUpInvoked = true; @@ -114,6 +105,7 @@ final protected function runAsyncTest(mixed ...$args): mixed final protected function runTest(): mixed { + $this->realTestName = $this->name(); parent::setName('runAsyncTest'); return parent::runTest(); } diff --git a/test/AsyncTestCaseTest.php b/test/AsyncTestCaseTest.php index f800ec9..b6d232b 100644 --- a/test/AsyncTestCaseTest.php +++ b/test/AsyncTestCaseTest.php @@ -80,7 +80,7 @@ public function testExpectingAnErrorThrown(): Future }); } - public function provideArguments(): array + public static function provideArguments(): array { return [ ['foo', 42, true],