Skip to content

Commit a1e4211

Browse files
committed
Fixed unit tests
1 parent 748a373 commit a1e4211

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/Entity/Advisory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Advisory extends AbstractBaseEntity
3333
#[ORM\Column]
3434
private ?\DateTimeImmutable $reportedAt = null;
3535

36-
#[ORM\Column(type: "json")]
36+
#[ORM\Column(type: 'json')]
3737
private array $sources = [];
3838

3939
#[ORM\ManyToMany(targetEntity: PackageVersion::class, mappedBy: 'advisories')]

tests/Api/AuthenticationTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class AuthenticationTest extends ApiTestCase
1616

1717
public function testAuthenticationDenied(): void
1818
{
19-
$response = static::createClient()->request('POST', '/api/detection_results', [
19+
static::createClient()->request('POST', '/api/detection_results', [
20+
'headers' => [
21+
'content-type' => 'application/json',
22+
],
2023
'body' => '{
2124
"type": "string",
2225
"rootDir": "string",
@@ -28,7 +31,7 @@ public function testAuthenticationDenied(): void
2831

2932
$this->assertResponseStatusCodeSame(Response::HTTP_UNAUTHORIZED, 'Unauthenticated requests should be denied');
3033

31-
$response = static::createClient()->request('POST', '/api/detection_results', [
34+
static::createClient()->request('POST', '/api/detection_results', [
3235
'headers' => [
3336
'content-type' => 'application/json',
3437
ApiKeyAuthenticator::AUTH_HEADER => ApiKeyAuthenticator::AUTH_HEADER_PREFIX.'123456789',

0 commit comments

Comments
 (0)