From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Tue, 23 May 2023 23:30:52 +0200
Subject: Group jwt for tests depending on it

---
 .../Security/Factory/AccessTokenFactoryTest.php                | 10 ++++++++++
 .../Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php |  3 +++
 .../Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php       |  5 +++++
 3 files changed, 18 insertions(+)

diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
index 88b7823..c41ebf2 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
@@ -185,6 +185,7 @@ class AccessTokenFactoryTest extends TestCase
 
     /**
      * @group legacy
+     * @group jwt
      *
      * @expectedDeprecation Since symfony/security-bundle 7.1: The "key" option is deprecated and will be removed in 8.0. Use the "keyset" option instead.
      */
@@ -223,6 +224,9 @@ class AccessTokenFactoryTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
     }
 
+    /**
+     * @group jwt
+     */
     public function testOidcTokenHandlerConfigurationWithMultipleAlgorithms()
     {
         $container = new ContainerBuilder();
@@ -258,6 +262,9 @@ class AccessTokenFactoryTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
     }
 
+    /**
+     * @group jwt
+     */
     public function testOidcTokenHandlerConfigurationWithEncryption()
     {
         $container = new ContainerBuilder();
@@ -340,6 +347,9 @@ class AccessTokenFactoryTest extends TestCase
         $this->processConfig($config, $factory);
     }
 
+    /**
+     * @group jwt
+     */
     public function testOidcTokenHandlerConfigurationWithDiscovery()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
index 75adf29..479df93 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
@@ -355,6 +355,7 @@ class AccessTokenTest extends AbstractWebTestCase
      * @dataProvider validAccessTokens
      *
      * @requires extension openssl
+     * @group jwt
      */
     public function testOidcSuccess(callable $tokenFactory)
     {
@@ -377,6 +378,7 @@ class AccessTokenTest extends AbstractWebTestCase
      * @dataProvider invalidAccessTokens
      *
      * @requires extension openssl
+     * @group jwt
      */
     public function testOidcFailure(callable $tokenFactory)
     {
@@ -397,6 +399,7 @@ class AccessTokenTest extends AbstractWebTestCase
 
     /**
      * @requires extension openssl
+     * @group jwt
      */
     public function testOidcFailureWithJweEnforced()
     {
diff --git a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
index 303fa56..64c2a2f 100644
--- a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
@@ -34,6 +34,7 @@ class OidcTokenHandlerTest extends TestCase
 
     /**
      * @dataProvider getClaims
+     * @group jwt
      */
     public function testGetsUserIdentifierFromSignedToken(string $claim, string $expected)
     {
@@ -78,6 +79,7 @@ class OidcTokenHandlerTest extends TestCase
 
     /**
      * @dataProvider getInvalidTokens
+     * @group jwt
      */
     public function testThrowsAnErrorIfTokenIsInvalid(string $token)
     {
@@ -127,6 +129,9 @@ class OidcTokenHandlerTest extends TestCase
         ];
     }
 
+    /**
+     * @group jwt
+     */
     public function testThrowsAnErrorIfUserPropertyIsMissing()
     {
         $loggerMock = $this->createMock(LoggerInterface::class);
