Skip to content
Snippets Groups Projects
Verified Commit 531147f6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3440180 by mondrake: Fix wrong getStatus() call in MenuAccessTest

parent 9b0a10b8
No related branches found
No related tags found
No related merge requests found
......@@ -393,7 +393,8 @@ private function assertUserRoutesAccess(AccountInterface $user, array $expectedA
$actualInaccessibleRoutes = [];
foreach ($allRoutes as $route) {
$this->drupalGet(Url::fromRoute($route));
switch ($this->getSession()->getStatusCode()) {
$requestStatus = $this->getSession()->getStatusCode();
switch ($requestStatus) {
case 200:
$actualAccessibleRoutes[] = $route;
break;
......@@ -403,7 +404,7 @@ private function assertUserRoutesAccess(AccountInterface $user, array $expectedA
break;
default:
throw new \UnexpectedValueException("Unexpected status code {$this->getStatus()} for route $route");
throw new \UnexpectedValueException("Unexpected status code {$requestStatus} for route {$route}");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment