8000 Fix tests · symfony/symfony@cf78f12 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf78f12

Browse files
Fix tests
1 parent 73e3cff commit cf78f12

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Symfony\Component\DependencyInjection\ChildDefinition;
2222
use Symfony\Component\DependencyInjection\ContainerBuilder;
2323
use Symfony\Component\DependencyInjection\Reference;
24+
use Symfony\Contracts\HttpClient\HttpClientInterface;
2425

2526
class AccessTokenFactoryTest extends TestCase
2627
{
@@ -126,6 +127,13 @@ public function testOidcUserInfoTokenHandlerConfigurationWithBaseUri(array|strin
126127
->replaceArgument(0, ['base_uri' => 'https://www.example.com/realms/demo/protocol/openid-connect/userinfo']),
127128
'index_2' => 'sub',
128129
];
130+
131+
if (!interface_exists(HttpClientInterface::class)) {
132+
$expected['index_0']
133+
->setFactory(null)
134+
->addError('You cannot use the "oidc_user_info" token handler since the HttpClient component is not installed. Try running "composer require symfony/http-client".');
135+
}
136+
129137
$this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
130138
}
131139

0 commit comments

Comments
 (0)
0