From be9fbfbfb84732d7dbe1f29f8503afa8608e8fe5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 9 Oct 2024 11:06:51 +0200 Subject: [PATCH 1/2] run tests using PHPUnit 11.5 --- Service/Test/ServiceLocatorTest.php | 14 +++++--------- Tests/Service/ServiceSubscriberTraitTest.php | 7 ++++--- phpunit.xml.dist | 10 +++++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Service/Test/ServiceLocatorTest.php b/Service/Test/ServiceLocatorTest.php index 07d12b4..015ca71 100644 --- a/Service/Test/ServiceLocatorTest.php +++ b/Service/Test/ServiceLocatorTest.php @@ -11,13 +11,9 @@ namespace Symfony\Contracts\Service\Test; -class_alias(ServiceLocatorTestCase::class, ServiceLocatorTest::class); - -if (false) { - /** - * @deprecated since PHPUnit 9.6 - */ - class ServiceLocatorTest - { - } +/** + * @deprecated since PHPUnit 9.6 + */ +class ServiceLocatorTest extends ServiceLocatorTestCase +{ } diff --git a/Tests/Service/ServiceSubscriberTraitTest.php b/Tests/Service/ServiceSubscriberTraitTest.php index bf0db2c..b506e6e 100644 --- a/Tests/Service/ServiceSubscriberTraitTest.php +++ b/Tests/Service/ServiceSubscriberTraitTest.php @@ -11,6 +11,8 @@ namespace Symfony\Contracts\Tests\Service; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use Symfony\Contracts\Service\Attribute\Required; @@ -19,9 +21,8 @@ use Symfony\Contracts\Service\ServiceSubscriberInterface; use Symfony\Contracts\Service\ServiceSubscriberTrait; -/** - * @group legacy - */ +#[IgnoreDeprecations] +#[Group('legacy')] class ServiceSubscriberTraitTest extends TestCase { public static function setUpBeforeClass(): void diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 947db86..8a2d548 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@ @@ -20,7 +21,7 @@ - + ./ @@ -30,6 +31,9 @@ ./Translation/Test/ ./vendor - + + + + From 4671917e49e03a37eafd5236a45ae357e62bc9b1 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 4 Aug 2025 09:53:42 +0200 Subject: [PATCH 2/2] CS fixes --- HttpClient/Test/HttpClientTestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HttpClient/Test/HttpClientTestCase.php b/HttpClient/Test/HttpClientTestCase.php index 9a528f6..3a1ad13 100644 --- a/HttpClient/Test/HttpClientTestCase.php +++ b/HttpClient/Test/HttpClientTestCase.php @@ -12,6 +12,7 @@ namespace Symfony\Contracts\HttpClient\Test; use PHPUnit\Framework\Attributes\RequiresPhpExtension; +use PHPUnit\Framework\Attributes\TestWithJson; use PHPUnit\Framework\TestCase; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; @@ -346,6 +347,8 @@ public function test304() * @testWith [[]] * [["Content-Length: 7"]] */ + #[TestWithJson('[[]]')] + #[TestWithJson('[["Content-Length: 7"]]')] public function testRedirects(array $headers = []) { $client = $this->getHttpClient(__FUNCTION__); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy