Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr committed Jul 3, 2024
1 parent 4f1a638 commit 40b23c1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions Tests/Functional/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'description' => 'API Platform integration in LexikJWTAuthenticationBundle',
'version' => '1.0.0',
'keep_legacy_inflector' => false,
'use_symfony_listeners' => true,
'formats' => [
'jsonld' => ['application/ld+json'],
'json' => ['application/json']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ public function testCheckOpenApiExportCommand()
"tags": [
"Login Check"
]
},
"parameters": []
}
}
},
"components": {
Expand Down
7 changes: 4 additions & 3 deletions Tests/Functional/WebTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Lexik\Bundle\JWTAuthenticationBundle\Tests\Functional;

use Symfony\Component\HttpFoundation\Request;
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Core\JWK;
use Jose\Component\Encryption\Algorithm\ContentEncryption\A128GCM;
Expand Down Expand Up @@ -76,7 +77,7 @@ public function testAnAccessTokenCanBeUsedForApiCall()

//When
static::$client->jsonRequest('POST', '/login_check', ['username' => 'lexik', 'password' => 'dummy']);
static::$client->request('GET', '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $this->getTokenFromResponse(static::$client->getResponse())]);
static::$client->request(Request::METHOD_GET, '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $this->getTokenFromResponse(static::$client->getResponse())]);
static::$client->getResponse();

//Then
Expand All @@ -103,7 +104,7 @@ public function testInvalidToken(string $token, string $message)
});

//When
static::$client->request('GET', '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $token]);
static::$client->request(Request::METHOD_GET, '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $token]);
$response = static::$client->getResponse();

//Then
Expand Down Expand Up @@ -137,7 +138,7 @@ public function testCriticalHeaderNotVerified()
);

//When
static::$client->request('GET', '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $token]);
static::$client->request(Request::METHOD_GET, '/api/secured', [], [], ['HTTP_AUTHORIZATION' => 'Bearer ' . $token]);
$response = static::$client->getResponse();

//Then
Expand Down
3 changes: 3 additions & 0 deletions Tests/Functional/config/base_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ framework:
secret: test
test: ~
http_method_override: false
handle_all_throwables: true
php_errors:
log: true

services:
lexik_jwt_authentication.test.jwt_event_subscriber:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"require-dev": {
"api-platform/core": "^3.0",
"rector/rector": "^1.2",
"symfony/browser-kit": "^6.4|^7.0",
"symfony/console": "^6.4|^7.0",
"symfony/dom-crawler": "^6.4|^7.0",
Expand Down

0 comments on commit 40b23c1

Please sign in to comment.