Test controller

This commit is contained in:
Pierre Rudloff 2017-01-16 17:19:19 +01:00
parent 5e09d8adc7
commit 16e1f9d6db
4 changed files with 327 additions and 2 deletions

View file

@ -98,6 +98,7 @@ class FrontController
'canonical' => $this->getCanonicalUrl($request),
]
);
return $response;
}
/**
@ -122,6 +123,7 @@ class FrontController
'canonical' => $this->getCanonicalUrl($request),
]
);
return $response;
}
/**
@ -144,6 +146,7 @@ class FrontController
'canonical' => $this->getCanonicalUrl($request),
]
);
return $response;
}
/**
@ -216,6 +219,7 @@ class FrontController
'canonical' => $this->getCanonicalUrl($request),
]
);
return $response;
}
/**
@ -343,8 +347,10 @@ class FrontController
} catch (\Exception $e) {
$response->getBody()->write($e->getMessage());
return $response->withHeader('Content-Type', 'text/plain');
return $response->withHeader('Content-Type', 'text/plain')->withStatus(500);
}
} else {
return $response->withRedirect($this->container->get('router')->pathFor('index'));
}
}