Skip to content
Snippets Groups Projects
Commit 4ff318b4 authored by Liam Morland's avatar Liam Morland
Browse files

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
...@@ -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);
......
...@@ -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.
* *
......
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