From 9524278b3702c445f2d6da7cd70cd807572d19b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Jensen?= Date: Wed, 11 Mar 2026 09:40:13 +0100 Subject: [PATCH] PhpUnit 13 support --- composer.json | 2 +- .../ApplicationFinishedSubscriberTest.php | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a21efc9..f0d195d 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": "^8.1", "ext-simplexml": "*", "ext-xmlreader": "*", - "phpunit/phpunit": "^10.3||^11.0||^12.0", + "phpunit/phpunit": "^10.3||^11.0||^12.0||^13.0", "symfony/console": "^5.4||^6.2||^7.0||^8.0" }, "autoload": { diff --git a/tests/Subscriber/Application/ApplicationFinishedSubscriberTest.php b/tests/Subscriber/Application/ApplicationFinishedSubscriberTest.php index 21b2b3b..d714ae8 100644 --- a/tests/Subscriber/Application/ApplicationFinishedSubscriberTest.php +++ b/tests/Subscriber/Application/ApplicationFinishedSubscriberTest.php @@ -493,6 +493,10 @@ public function testNotifyWithInvalidRuleInstances(): void public function testFromConfigurationAndParameters(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertEquals( new ApplicationFinishedSubscriber( pathToCloverXml: 'tests/clover.xml', @@ -514,6 +518,10 @@ public function testFromConfigurationAndParameters(): void public function testFromConfigurationAndParameters2(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertEquals( new ApplicationFinishedSubscriber( pathToCloverXml: 'tests/clover.xml', @@ -537,6 +545,10 @@ public function testFromConfigurationAndParameters2(): void public function testFromConfigurationAndParametersFromFile(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertEquals( expected: new ApplicationFinishedSubscriber( pathToCloverXml: 'tests/clover.xml', @@ -558,6 +570,10 @@ public function testFromConfigurationAndParametersFromFile(): void public function testFromConfigurationAndParametersWhenInvalidMinCoverage(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertNull( actual: ApplicationFinishedSubscriber::fromConfigurationAndParameters( configuration: (new Builder())->build([ @@ -571,6 +587,10 @@ public function testFromConfigurationAndParametersWhenInvalidMinCoverage(): void public function testFromConfigurationAndParametersWhenCoverageTooHigh(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertNull( actual: ApplicationFinishedSubscriber::fromConfigurationAndParameters( configuration: (new Builder())->build([ @@ -584,6 +604,10 @@ public function testFromConfigurationAndParametersWhenCoverageTooHigh(): void public function testFromConfigurationAndParametersWhenRulesAreEmpty(): void { + $this->exitter + ->expects($this->never()) + ->method('exit'); + $this->assertNull( ApplicationFinishedSubscriber::fromConfigurationAndParameters( configuration: (new Builder())->build([