1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
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);
|