Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
e48631b7
Commit
e48631b7
authored
4 years ago
by
Kevin Kaland
Browse files
Options
Downloads
Patches
Plain Diff
Issue #3114541 by wizonesolutions: Remove useless check.
parent
162a9d3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Service/FillPdfLinkManipulator.php
+0
-4
0 additions, 4 deletions
src/Service/FillPdfLinkManipulator.php
tests/src/Functional/LinkManipulatorTest.php
+0
-3
0 additions, 3 deletions
tests/src/Functional/LinkManipulatorTest.php
with
0 additions
and
7 deletions
src/Service/FillPdfLinkManipulator.php
+
0
−
4
View file @
e48631b7
...
@@ -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.'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/src/Functional/LinkManipulatorTest.php
+
0
−
3
View file @
e48631b7
...
@@ -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'
,
[],
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment