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
4ff318b4
Commit
4ff318b4
authored
2 years ago
by
Liam Morland
Browse files
Options
Downloads
Patches
Plain Diff
Issue #3272475: Remove special handling for old versions of Drupal
parent
bd6babe7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/src/Functional/FillPdfUploadTestBase.php
+2
-14
2 additions, 14 deletions
tests/src/Functional/FillPdfUploadTestBase.php
tests/src/Functional/PdfPopulationTest.php
+0
-6
0 additions, 6 deletions
tests/src/Functional/PdfPopulationTest.php
with
2 additions
and
20 deletions
tests/src/Functional/FillPdfUploadTestBase.php
+
2
−
14
View file @
4ff318b4
...
@@ -110,13 +110,7 @@ abstract class FillPdfUploadTestBase extends FillPdfTestBase {
...
@@ -110,13 +110,7 @@ abstract class FillPdfUploadTestBase extends FillPdfTestBase {
/** @var \Drupal\file\FileInterface $new_file */
/** @var \Drupal\file\FileInterface $new_file */
$new_file
=
File
::
load
(
$this
->
getLastFileId
());
$new_file
=
File
::
load
(
$this
->
getLastFileId
());
$new_filename
=
$new_file
->
getFilename
();
$new_filename
=
$new_file
->
getFilename
();
if
(
version_compare
(
\Drupal
::
VERSION
,
'8.8.0'
,
'<'
))
{
$this
->
assertFileExists
(
$new_file
->
getFileUri
());
// @todo REMOVE when Drupal 8.7.x is no longer supported.
$this
->
assertFileExists
(
$new_file
);
}
else
{
$this
->
assertFileExists
(
$new_file
->
getFileUri
());
}
$this
->
assertLessThan
((
int
)
$new_file
->
id
(),
$previous_file_id
);
$this
->
assertLessThan
((
int
)
$new_file
->
id
(),
$previous_file_id
);
// If the same file was previously uploaded, it should have a "_0" appendix.
// If the same file was previously uploaded, it should have a "_0" appendix.
...
@@ -136,13 +130,7 @@ abstract class FillPdfUploadTestBase extends FillPdfTestBase {
...
@@ -136,13 +130,7 @@ abstract class FillPdfUploadTestBase extends FillPdfTestBase {
// Now remove the PDF file again. The temporary file should now be
// Now remove the PDF file again. The temporary file should now be
// removed both from the disk and the database.
// removed both from the disk and the database.
$this
->
drupalPostForm
(
NULL
,
NULL
,
self
::
OP_REMOVE
);
$this
->
drupalPostForm
(
NULL
,
NULL
,
self
::
OP_REMOVE
);
if
(
version_compare
(
\Drupal
::
VERSION
,
'8.8.0'
,
'<'
))
{
$this
->
assertFileNotExists
(
$new_file
->
getFileUri
());
// @todo REMOVE when Drupal 8.7.x is no longer supported.
$this
->
assertFileNotExists
(
$new_file
);
}
else
{
$this
->
assertFileNotExists
(
$new_file
->
getFileUri
());
}
// @todo Simplify once Core bug gets fixed.
// @todo Simplify once Core bug gets fixed.
// @see https://www.drupal.org/project/drupal/issues/3043127
// @see https://www.drupal.org/project/drupal/issues/3043127
$this
->
assertFileEntryNotExists
(
$new_file
,
NULL
);
$this
->
assertFileEntryNotExists
(
$new_file
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
tests/src/Functional/PdfPopulationTest.php
+
0
−
6
View file @
4ff318b4
...
@@ -9,12 +9,6 @@ use Drupal\fillpdf_test\Plugin\PdfBackend\TestPdfBackend;
...
@@ -9,12 +9,6 @@ use Drupal\fillpdf_test\Plugin\PdfBackend\TestPdfBackend;
use
Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait
;
use
Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait
;
use
Drupal\user\Entity\Role
;
use
Drupal\user\Entity\Role
;
// When 8.7.x is fully EOL, this can be removed.
if
(
!
trait_exists
(
'\Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait'
))
{
class_alias
(
'\Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait'
,
'\Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait'
);
}
/**
/**
* Tests Core entity population and image stamping.
* Tests Core entity population and image stamping.
*
*
...
...
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