Skip to content

Commit

Permalink
[Rector][Tests] Applied all Symfony 5.x rectors to the test codebase
Browse files Browse the repository at this point in the history
Applied rules:
 * ResponseStatusCodeRector
  • Loading branch information
alongosz committed Aug 7, 2024
1 parent 2df992d commit 5dd0089
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/bundle/EventListener/ResponseListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function setUp(): void
{
$this->eventValue = new stdClass();
$this->exceptionEventValue = new Exception();
$this->response = new Response('BODY', 406, ['foo' => 'bar']);
$this->response = new Response('BODY', Response::HTTP_NOT_ACCEPTABLE, ['foo' => 'bar']);
}

public function provideExpectedSubscribedEventTypes(): array
Expand Down
16 changes: 8 additions & 8 deletions tests/lib/Output/VisitorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testVisitDocument()
->getMock();

self::assertEquals(
new Response('Hello world!', 200, []),
new Response('Hello world!', Response::HTTP_OK, []),
$visitor->visit($data)
);
}
Expand Down Expand Up @@ -76,7 +76,7 @@ public function testVisitEmptyDocument()
->getMock();

self::assertEquals(
new Response(null, 200, []),
new Response(null, Response::HTTP_OK, []),
$visitor->visit($data)
);
}
Expand Down Expand Up @@ -108,7 +108,7 @@ public function testSetHeaders()
self::assertEquals(
new Response(
null,
200,
Response::HTTP_OK,
[
'Content-Type' => 'text/xml',
]
Expand All @@ -133,7 +133,7 @@ public function testSetFilteredHeaders()
self::assertEquals(
new Response(
null,
200,
Response::HTTP_OK,
[
'Content-Type' => 'text/xml',
]
Expand All @@ -153,7 +153,7 @@ public function testSetHeadersNoOverwrite()
self::assertEquals(
new Response(
null,
200,
Response::HTTP_OK,
[
'Content-Type' => 'text/xml',
]
Expand All @@ -176,7 +176,7 @@ public function testSetHeaderResetAfterVisit()
self::assertEquals(
new Response(
null,
200,
Response::HTTP_OK,
[]
),
$result
Expand All @@ -193,7 +193,7 @@ public function testSetStatusCode()
self::assertEquals(
new Response(
null,
201
Response::HTTP_CREATED
),
$visitor->visit($data)
);
Expand All @@ -211,7 +211,7 @@ public function testSetStatusCodeNoOverride()
self::assertEquals(
new Response(
null,
201
Response::HTTP_CREATED
),
$visitor->visit($data)
);
Expand Down

0 comments on commit 5dd0089

Please sign in to comment.