refactor: use english for routes, parameters and internal messages

This commit is contained in:
fromme committed 2026-09-13 18:58:24 +02:00
1 parent bce8f58be3
commit a88ff7ff24
22 files changed
+106 -135

No files matched your search

+7 -7
View File
@@ -16,20 +16,20 @@ class HxTraitTest extends TestCase
{
public function testHtmxRequestsGetAnHxRedirectInsteadOfA302(): void
{
$response = $this->controller()->redirectTo($this->request(['HTTP_HX-Request' => 'true']), '/buchungen');
$response = $this->controller()->redirectTo($this->request(['HTTP_HX-Request' => 'true']), '/bookings');
self::assertInstanceOf(HxRedirectResponse::class, $response);
self::assertSame('/buchungen', $response->headers->get('HX-Redirect'));
self::assertSame('/bookings', $response->headers->get('HX-Redirect'));
// A 3xx would be followed by the browser and swapped as a whole page into the fragment.
self::assertSame(Response::HTTP_OK, $response->getStatusCode());
}
public function testOrdinaryRequestsGetANormalRedirect(): void
{
$response = $this->controller()->redirectTo($this->request(), '/buchungen');
$response = $this->controller()->redirectTo($this->request(), '/bookings');
self::assertInstanceOf(RedirectResponse::class, $response);
self::assertSame('/buchungen', $response->getTargetUrl());
self::assertSame('/bookings', $response->getTargetUrl());
}
public function testOobResponseConcatenatesEveryRequestedBlock(): void
@@ -69,8 +69,8 @@ class HxTraitTest extends TestCase
self::assertFalse($controller->oob('t.html.twig', ['b'])->headers->has('HX-Push-Url'));
self::assertSame(
'/buchungen?datum=2026-09-13',
$controller->oob('t.html.twig', ['b'], [], '/buchungen?datum=2026-09-13')->headers->get('HX-Push-Url'),
'/bookings?date=2026-09-13',
$controller->oob('t.html.twig', ['b'], [], '/bookings?date=2026-09-13')->headers->get('HX-Push-Url'),
);
}
@@ -79,7 +79,7 @@ class HxTraitTest extends TestCase
*/
private function request(array $server = []): Request
{
return Request::create('/buchungen', server: $server);
return Request::create('/bookings', server: $server);
}
private function controller(): object