Skip to content

Conversation

@AZabolotnikov
Copy link
Contributor

No description provided.

@AZabolotnikov AZabolotnikov self-assigned this Jun 25, 2025
composer.json Outdated
"laravel/framework": ">=11.34",
"lcobucci/jwt": "^5.3"
"lcobucci/jwt": "^5.3",
"ext-openssl": "*"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move it to the require-dev key

Comment on lines 10 to 14
public function setUp(): void
{
parent::setUp();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function setUp(): void
{
parent::setUp();
}

Comment on lines 23 to 24
signingKey: InMemory::file(base_path(self::SECRET_KEY_PATH), self::SECRET_KEY_PASS),
verificationKey: InMemory::file(base_path(self::SIGNER_KEY_PATH)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we use plainText instead?

Suggested change
signingKey: InMemory::file(base_path(self::SECRET_KEY_PATH), self::SECRET_KEY_PASS),
verificationKey: InMemory::file(base_path(self::SIGNER_KEY_PATH)),
signingKey: InMemory::plainText($signerKeyContent, self::SECRET_KEY_PASS),
verificationKey: InMemory::plainText($verificationKeyContent),

Comment on lines 29 to 30
$tokenBuilder = $configJwt->builder()
->issuedBy('some_issuer')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$tokenBuilder = $configJwt->builder()
->issuedBy('some_issuer')
$tokenBuilder = $configJwt
->builder()
->issuedBy('some_issuer')

Comment on lines 27 to 32
$guard = app(ClerkGuard::class);

$request = new Request();
$request->headers->set('Authorization', "Bearer {$clerkToken}");

$guard->setRequest($request);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$guard = app(ClerkGuard::class);
$request = new Request();
$request->headers->set('Authorization', "Bearer {$clerkToken}");
$guard->setRequest($request);
$request = new Request();
$request->headers->set('Authorization', "Bearer {$clerkToken}");
$guard = app(ClerkGuard::class)->setRequest($request);

]);

$clerkToken = $this
->createJWTToken('some_user_id')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's pass issuer as the second arg, as it not clear to understand why it fail in another test

@DenTray DenTray assigned AZabolotnikov and unassigned DenTray Jun 30, 2025
@AZabolotnikov AZabolotnikov removed their assignment Jun 30, 2025
Comment on lines 32 to 33
$request = new Request();
$request->headers->set('Authorization', "Bearer {$clerkToken}");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move it to the helper

Suggested change
$request = new Request();
$request->headers->set('Authorization', "Bearer {$clerkToken}");
$request = $this->generateRequest(['Authorization' => "Bearer {$clerkToken}"]);

@DenTray DenTray assigned AZabolotnikov and unassigned DenTray Jul 3, 2025
@DenTray DenTray merged commit 9e1623f into main Jul 3, 2025
2 checks passed
@DenTray DenTray deleted the feat-add-tests-with-coverage branch July 3, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants