refactor: use english for routes, parameters and internal messages
This commit is contained in:
1 parent
bce8f58be3
commit
a88ff7ff24
22 files changed
+106
-135
No files matched your search
@@ -46,8 +46,8 @@ class DashboardControllerTest extends WebTestCase
|
||||
foreach (ResourceType::cases() as $type) {
|
||||
self::assertCount(
|
||||
1,
|
||||
$crawler->filter(\sprintf('a[href="/buchen/%s"]', $type->slug())),
|
||||
\sprintf('no dashboard tile links to the %s board', $type->slug()),
|
||||
$crawler->filter(\sprintf('a[href="/book/%s"]', $type->value)),
|
||||
\sprintf('no dashboard tile links to the %s board', $type->value),
|
||||
);
|
||||
self::assertStringContainsString($type->plural(), $crawler->html());
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
$this->client->loginUser($this->user());
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
self::assertCount(1, $crawler->filter('a[href="/buchungen"]'));
|
||||
self::assertCount(1, $crawler->filter('a[href="/bookings"]'));
|
||||
}
|
||||
|
||||
public function testTheNavigationIsGone(): void
|
||||
@@ -86,7 +86,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
$this->client->loginUser($user);
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
$tile = $crawler->filter('a[href="/buchen/schreibtische"]')->text();
|
||||
$tile = $crawler->filter('a[href="/book/desk"]')->text();
|
||||
self::assertStringContainsString('von 2 heute frei', $tile);
|
||||
self::assertStringContainsString('1', $tile);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
$this->client->loginUser($this->user());
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
self::assertStringContainsString('heute alles belegt', $crawler->filter('a[href="/buchen/schreibtische"]')->text());
|
||||
self::assertStringContainsString('heute alles belegt', $crawler->filter('a[href="/book/desk"]')->text());
|
||||
}
|
||||
|
||||
public function testYourOwnBookingIsCalledOutOnTheTile(): void
|
||||
@@ -116,7 +116,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
$this->client->loginUser($user);
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
self::assertStringContainsString('D1', $crawler->filter('a[href="/buchen/schreibtische"]')->text());
|
||||
self::assertStringContainsString('D1', $crawler->filter('a[href="/book/desk"]')->text());
|
||||
}
|
||||
|
||||
public function testABoardOnlyShowsItsOwnKindOfResource(): void
|
||||
@@ -126,11 +126,11 @@ class DashboardControllerTest extends WebTestCase
|
||||
|
||||
$this->client->loginUser($this->user());
|
||||
|
||||
$desks = $this->client->request('GET', '/buchen/schreibtische')->html();
|
||||
$desks = $this->client->request('GET', '/book/desk')->html();
|
||||
self::assertStringContainsString('D1', $desks);
|
||||
self::assertStringNotContainsString('P1', $desks);
|
||||
|
||||
$parking = $this->client->request('GET', '/buchen/parkplaetze')->html();
|
||||
$parking = $this->client->request('GET', '/book/parking')->html();
|
||||
self::assertStringContainsString('P1', $parking);
|
||||
self::assertStringNotContainsString('D1', $parking);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
public function testAnUnknownBookingAreaIsNotFound(): void
|
||||
{
|
||||
$this->client->loginUser($this->user());
|
||||
$this->client->request('GET', '/buchen/fahrraeder');
|
||||
$this->client->request('GET', '/book/bikes');
|
||||
|
||||
self::assertResponseStatusCodeSame(404);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ class DashboardControllerTest extends WebTestCase
|
||||
|
||||
self::assertStringContainsString(
|
||||
'noch nichts eingerichtet',
|
||||
$this->client->request('GET', '/buchen/parkplaetze')->html(),
|
||||
$this->client->request('GET', '/book/parking')->html(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user