Skip to content
Snippets Groups Projects
Commit e48631b7 authored by Kevin Kaland's avatar Kevin Kaland
Browse files

Issue #3114541 by wizonesolutions: Remove useless check.

parent 162a9d3d
No related branches found
No related tags found
No related merge requests found
...@@ -61,10 +61,6 @@ class FillPdfLinkManipulator implements FillPdfLinkManipulatorInterface { ...@@ -61,10 +61,6 @@ class FillPdfLinkManipulator implements FillPdfLinkManipulatorInterface {
public function parseLink(Url $link) { public function parseLink(Url $link) {
$query = $link->getOption('query'); $query = $link->getOption('query');
if (!$query) {
throw new \InvalidArgumentException("This link doesn't specify a query string, so failing.");
}
if (empty($query['fid'])) { if (empty($query['fid'])) {
throw new \InvalidArgumentException('No FillPDF Form was specified in the query string, so failing.'); throw new \InvalidArgumentException('No FillPDF Form was specified in the query string, so failing.');
} }
......
...@@ -52,9 +52,6 @@ class LinkManipulatorTest extends BrowserTestBase { ...@@ -52,9 +52,6 @@ class LinkManipulatorTest extends BrowserTestBase {
// Hit the generation route with no query string set. // Hit the generation route with no query string set.
$fillpdf_route = Url::fromRoute('fillpdf.populate_pdf', [], []); $fillpdf_route = Url::fromRoute('fillpdf.populate_pdf', [], []);
$this->drupalGet($fillpdf_route); $this->drupalGet($fillpdf_route);
// Ensure the exception is converted to an error and access is denied.
$this->assertSession()->statusCodeEquals(403);
$this->assertSession()->pageTextContains("This link doesn't specify a query string, so failing.");
// Hit the generation route with no fid set. // Hit the generation route with no fid set.
$fillpdf_route = Url::fromRoute('fillpdf.populate_pdf', [], [ $fillpdf_route = Url::fromRoute('fillpdf.populate_pdf', [], [
......
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