From 8f0de4d723f8e8a24ea4f5ca0eeec15bfe30fe68 Mon Sep 17 00:00:00 2001
From: Bernd Oliver Suenderhauf <bos@suenderhauf.de>
Date: Fri, 21 Jun 2019 14:20:54 +0200
Subject: [PATCH] Issue #3040900 by Pancho: Move legacy backend support incl.
 the JavaBridge ("local") backend to a submodule

---
 fillpdf.install                               | 17 ++++++++
 fillpdf.services.yml                          | 10 -----
 .../fillpdf_legacy/fillpdf_legacy.info.yml    |  8 ++++
 modules/fillpdf_legacy/fillpdf_legacy.module  | 39 +++++++++++++++++++
 .../fillpdf_legacy.services.yml               | 10 +++++
 .../src}/Annotation/BackendService.php        |  2 +-
 .../LocalServerBackendService.php             |  2 +-
 .../src}/Plugin/BackendServiceInterface.php   |  2 +-
 .../src/Plugin/BackendServiceManager.php      |  6 +--
 .../JavaBridgeFillPdfBackend.php              |  7 +---
 .../src/Plugin/FillPdfBackendManager.php      | 27 ++-----------
 .../PdfBackend/LegacyProviderPdfBackend.php   |  8 ++--
 .../tests/Kernel/LegacyBackendTest.php        | 21 ++++++++++
 src/Form/FillPdfSettingsForm.php              |  9 -----
 src/Plugin/BackendServiceBase.php             |  1 +
 src/Plugin/PdfBackendManager.php              |  3 +-
 .../fillpdf_test/fillpdf_test.info.yml        |  2 +-
 tests/src/Functional/UninstallTest.php        |  2 +-
 tests/src/Kernel/FillPdfBackendTest.php       | 18 ---------
 19 files changed, 114 insertions(+), 80 deletions(-)
 create mode 100644 modules/fillpdf_legacy/fillpdf_legacy.info.yml
 create mode 100644 modules/fillpdf_legacy/fillpdf_legacy.module
 create mode 100644 modules/fillpdf_legacy/fillpdf_legacy.services.yml
 rename {src => modules/fillpdf_legacy/src}/Annotation/BackendService.php (93%)
 rename {src => modules/fillpdf_legacy/src}/Plugin/BackendService/LocalServerBackendService.php (98%)
 rename {src => modules/fillpdf_legacy/src}/Plugin/BackendServiceInterface.php (98%)
 rename src/Plugin/LegacyBackendServiceManager.php => modules/fillpdf_legacy/src/Plugin/BackendServiceManager.php (85%)
 rename {src => modules/fillpdf_legacy/src}/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php (94%)
 rename src/Plugin/LegacyFillPdfBackendManager.php => modules/fillpdf_legacy/src/Plugin/FillPdfBackendManager.php (65%)
 rename {src => modules/fillpdf_legacy/src}/Plugin/PdfBackend/LegacyProviderPdfBackend.php (93%)
 create mode 100644 modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php
 delete mode 100644 tests/src/Kernel/FillPdfBackendTest.php

diff --git a/fillpdf.install b/fillpdf.install
index cf6781a..295ef24 100644
--- a/fillpdf.install
+++ b/fillpdf.install
@@ -193,3 +193,20 @@ function fillpdf_update_8109() {
     $settings->set('shell_locale', 'en_US.utf8')->save();
   }
 }
+
+/**
+ * Install FillPDF legacy backend sub-module.
+ */
+function fillpdf_update_8110() {
+  if (!\Drupal::moduleHandler()->moduleExists('fillpdf_legacy')) {
+    /** @var \Drupal\Core\Extension\ModuleInstaller $module_installer */
+    $module_installer = \Drupal::service('module_installer');
+    $module_installer->install(['fillpdf_legacy']);
+
+    $base_url = \Drupal::request()->getBasePath();
+    return new FormattableMarkup("Installed the <a href=':list'>FillPDF legacy backend support</a> sub-module.<br />If you're not using any legacy backends, you may safely <a href=':uninstall'>uninstall it again.</a>.", [
+      ':list' => Url::fromRoute('system.modules_list', [], ['fragment' => 'module-fillpdf'])->setOption('base_url', $base_url)->toString(),
+      ':uninstall' => Url::fromRoute('system.modules_uninstall')->setOption('base_url', $base_url)->toString(),
+    ]);
+  }
+}
diff --git a/fillpdf.services.yml b/fillpdf.services.yml
index 78284cd..7cac75c 100644
--- a/fillpdf.services.yml
+++ b/fillpdf.services.yml
@@ -3,16 +3,6 @@ services:
     class: Drupal\fillpdf\Plugin\PdfBackendManager
     parent: default_plugin_manager
 
-  plugin.manager.fillpdf_backend:
-    class: Drupal\fillpdf\Plugin\LegacyFillPdfBackendManager
-    parent: default_plugin_manager
-    deprecated: The "%service_id%" service is deprecated. You should use the 'plugin.manager.fillpdf.pdf_backend' service instead.
-
-  plugin.manager.fillpdf_backend_service:
-    class: Drupal\fillpdf\Plugin\LegacyBackendServiceManager
-    parent: default_plugin_manager
-    deprecated: The "%service_id%" service is deprecated. You should use the 'plugin.manager.fillpdf.pdf_backend' service instead.
-
   fillpdf.link_manipulator:
     class: Drupal\fillpdf\Service\FillPdfLinkManipulator
 
diff --git a/modules/fillpdf_legacy/fillpdf_legacy.info.yml b/modules/fillpdf_legacy/fillpdf_legacy.info.yml
new file mode 100644
index 0000000..01f5c33
--- /dev/null
+++ b/modules/fillpdf_legacy/fillpdf_legacy.info.yml
@@ -0,0 +1,8 @@
+name: 'FillPDF legacy backend support'
+type: module
+description: 'Provides support to legacy backend plugins.'
+core: 8.x
+package: Other
+configure: fillpdf.settings
+dependencies:
+  - drupal:fillpdf
diff --git a/modules/fillpdf_legacy/fillpdf_legacy.module b/modules/fillpdf_legacy/fillpdf_legacy.module
new file mode 100644
index 0000000..2281e66
--- /dev/null
+++ b/modules/fillpdf_legacy/fillpdf_legacy.module
@@ -0,0 +1,39 @@
+<?php
+
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\StringTranslation\TranslatableMarkup;
+
+/**
+ * Implements hook_form_FORM_ID_alter().
+ */
+function fillpdf_legacy_form_fillpdf_settings_alter(array &$form, FormStateInterface $form_state) {
+  $label = new TranslatableMarkup('Local PHP/JavaBridge');
+  $description = new TranslatableMarkup('Legacy. Use FillPDF LocalServer instead.');
+  $form['backend']['#options']['local'] = "<strong>{$label}</strong>: {$description}";
+
+  $form['local']['warning'] = [
+    '#type' => 'item',
+    '#markup' => '<div class="messages messages--warning">' . new TranslatableMarkup('Please note that the Local PHP/JavaBridge backend is deprecated and will be removed from FillPDF 5.x. Use FillPDF LocalServer instead.') . '</div>',
+    '#states' => [
+      'visible' => [
+        ':radio[name="backend"]' => ['value' => 'local'],
+      ],
+    ],
+  ];
+
+  $form['#validate'][] = '_fillpdf_legacy_form_fillpdf_settings_validate';
+}
+
+/**
+ * Extra validation handler for fillpdf_legacy_form_fillpdf_settings_alter().
+ *
+ * @see fillpdf_legacy_form_fillpdf_settings_alter()
+ */
+function _fillpdf_legacy_form_fillpdf_settings_validate($form, FormStateInterface $form_state) {
+  if ($form_state->getValue('backend') == 'local') {
+    $status = file_exists(drupal_get_path('module', 'fillpdf') . '/lib/JavaBridge/java/Java.inc');
+    if ($status === FALSE) {
+      $form_state->setError($form['backend'], new TranslatableMarkup('JavaBridge is not installed locally.'));
+    }
+  }
+}
diff --git a/modules/fillpdf_legacy/fillpdf_legacy.services.yml b/modules/fillpdf_legacy/fillpdf_legacy.services.yml
new file mode 100644
index 0000000..6fbcfe3
--- /dev/null
+++ b/modules/fillpdf_legacy/fillpdf_legacy.services.yml
@@ -0,0 +1,10 @@
+services:
+  plugin.manager.fillpdf_backend:
+    class: Drupal\fillpdf_legacy\Plugin\FillPdfBackendManager
+    parent: default_plugin_manager
+    deprecated: The "%service_id%" service is deprecated. You should use the 'plugin.manager.fillpdf.pdf_backend' service instead.
+
+  plugin.manager.fillpdf_backend_service:
+    class: Drupal\fillpdf_legacy\Plugin\BackendServiceManager
+    parent: default_plugin_manager
+    deprecated: The "%service_id%" service is deprecated. You should use the 'plugin.manager.fillpdf.pdf_backend' service instead.
diff --git a/src/Annotation/BackendService.php b/modules/fillpdf_legacy/src/Annotation/BackendService.php
similarity index 93%
rename from src/Annotation/BackendService.php
rename to modules/fillpdf_legacy/src/Annotation/BackendService.php
index 91707fc..2b41c14 100644
--- a/src/Annotation/BackendService.php
+++ b/modules/fillpdf_legacy/src/Annotation/BackendService.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Annotation;
+namespace Drupal\fillpdf_legacy\Annotation;
 
 use Drupal\Component\Annotation\Plugin;
 
diff --git a/src/Plugin/BackendService/LocalServerBackendService.php b/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php
similarity index 98%
rename from src/Plugin/BackendService/LocalServerBackendService.php
rename to modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php
index 9b70402..7816760 100644
--- a/src/Plugin/BackendService/LocalServerBackendService.php
+++ b/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin\BackendService;
+namespace Drupal\fillpdf_legacy\Plugin\BackendService;
 
 use Drupal\Core\File\FileSystem;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
diff --git a/src/Plugin/BackendServiceInterface.php b/modules/fillpdf_legacy/src/Plugin/BackendServiceInterface.php
similarity index 98%
rename from src/Plugin/BackendServiceInterface.php
rename to modules/fillpdf_legacy/src/Plugin/BackendServiceInterface.php
index 987726b..26b50c9 100644
--- a/src/Plugin/BackendServiceInterface.php
+++ b/modules/fillpdf_legacy/src/Plugin/BackendServiceInterface.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin;
+namespace Drupal\fillpdf_legacy\Plugin;
 
 use Drupal\Component\Plugin\PluginInspectionInterface;
 
diff --git a/src/Plugin/LegacyBackendServiceManager.php b/modules/fillpdf_legacy/src/Plugin/BackendServiceManager.php
similarity index 85%
rename from src/Plugin/LegacyBackendServiceManager.php
rename to modules/fillpdf_legacy/src/Plugin/BackendServiceManager.php
index 966a98b..c0c3cc6 100644
--- a/src/Plugin/LegacyBackendServiceManager.php
+++ b/modules/fillpdf_legacy/src/Plugin/BackendServiceManager.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin;
+namespace Drupal\fillpdf_legacy\Plugin;
 
 use Drupal\Core\Plugin\DefaultPluginManager;
 use Drupal\Core\Cache\CacheBackendInterface;
@@ -14,7 +14,7 @@ use Drupal\Core\Extension\ModuleHandlerInterface;
  * @see https://www.drupal.org/node/3059476
  * @see \Drupal\fillpdf\Plugin\PdfBackendManager
  */
-class LegacyBackendServiceManager extends DefaultPluginManager {
+class BackendServiceManager extends DefaultPluginManager {
 
   /**
    * Constructs a new LegacyBackendServiceManager object.
@@ -28,7 +28,7 @@ class LegacyBackendServiceManager extends DefaultPluginManager {
    *   The module handler to invoke the alter hook with.
    */
   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
-    parent::__construct('Plugin/BackendService', $namespaces, $module_handler, 'Drupal\fillpdf\Plugin\BackendServiceInterface', 'Drupal\fillpdf\Annotation\BackendService');
+    parent::__construct('Plugin/BackendService', $namespaces, $module_handler, 'Drupal\fillpdf_legacy\Plugin\BackendServiceInterface', 'Drupal\fillpdf_legacy\Annotation\BackendService');
 
     $this->alterInfo('fillpdf_fillpdf_backend_info');
     $this->setCacheBackend($cache_backend, 'fillpdf_fillpdf_backend_plugins');
diff --git a/src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php b/modules/fillpdf_legacy/src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php
similarity index 94%
rename from src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php
rename to modules/fillpdf_legacy/src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php
index bb40f1f..5474b87 100644
--- a/src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php
+++ b/modules/fillpdf_legacy/src/Plugin/FillPdfBackend/JavaBridgeFillPdfBackend.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin\FillPdfBackend;
+namespace Drupal\fillpdf_legacy\Plugin\FillPdfBackend;
 
 use Drupal\Core\File\FileSystem;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -13,10 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  * Legacy JavaBridge FillPdfBackend plugin.
  *
  * @Plugin(
- *   id = "local",
- *   label = @Translation("Local PHP/Java-Bridge"),
- *   description = @Translation("Legacy. Use FillPDF LocalServer instead."),
- *   weight = 10
+ *   id = "local"
  * )
  *
  * @deprecated in fillpdf:8.x-4.9 and is removed from fillpdf:8.x-5.0.
diff --git a/src/Plugin/LegacyFillPdfBackendManager.php b/modules/fillpdf_legacy/src/Plugin/FillPdfBackendManager.php
similarity index 65%
rename from src/Plugin/LegacyFillPdfBackendManager.php
rename to modules/fillpdf_legacy/src/Plugin/FillPdfBackendManager.php
index dcef1db..285ebe8 100644
--- a/src/Plugin/LegacyFillPdfBackendManager.php
+++ b/modules/fillpdf_legacy/src/Plugin/FillPdfBackendManager.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin;
+namespace Drupal\fillpdf_legacy\Plugin;
 
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -14,10 +14,10 @@ use Drupal\Core\Plugin\DefaultPluginManager;
  * @see https://www.drupal.org/node/3059476
  * @see \Drupal\fillpdf\Plugin\PdfBackendManager
  */
-class LegacyFillPdfBackendManager extends DefaultPluginManager {
+class FillPdfBackendManager extends DefaultPluginManager {
 
   /**
-   * Constructs a LegacyFillPdfBackendManager object.
+   * Constructs a FillPdfBackendManager object.
    *
    * @param \Traversable $namespaces
    *   An object that implements \Traversable which contains the root paths
@@ -34,25 +34,4 @@ class LegacyFillPdfBackendManager extends DefaultPluginManager {
     $this->setCacheBackend($cache_backend, 'fillpdf_backend_info_plugins');
   }
 
-  /**
-   * Gets the definitions of all FillPDF backend plugins.
-   *
-   * @return mixed[]
-   *   An associative array of plugin definitions, keyed by plugin ID.
-   */
-  public function getDefinitions() {
-    $definitions = parent::getDefinitions();
-
-    foreach ($definitions as $id => $definition) {
-      if (!isset($definition['description'])) {
-        $definitions[$id]['description'] = '';
-      }
-      if (!isset($definition['weight'])) {
-        $definitions[$id]['weight'] = 0;
-      }
-    }
-
-    return $definitions;
-  }
-
 }
diff --git a/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php b/modules/fillpdf_legacy/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
similarity index 93%
rename from src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
rename to modules/fillpdf_legacy/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
index 02c9d08..30b38dc 100644
--- a/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
+++ b/modules/fillpdf_legacy/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
@@ -1,13 +1,13 @@
 <?php
 
-namespace Drupal\fillpdf\Plugin\PdfBackend;
+namespace Drupal\fillpdf_legacy\Plugin\PdfBackend;
 
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\file\FileInterface;
 use Drupal\fillpdf\Entity\FillPdfForm;
 use Drupal\fillpdf\FieldMapping\ImageFieldMapping;
 use Drupal\fillpdf\FieldMapping\TextFieldMapping;
-use Drupal\fillpdf\Plugin\LegacyFillPdfBackendManager;
+use Drupal\fillpdf_legacy\Plugin\FillPdfBackendManager;
 use Drupal\fillpdf\Plugin\PdfBackendBase;
 use Drupal\fillpdf\FillPdfBackendPluginInterface;
 use Drupal\fillpdf\FillPdfFormInterface;
@@ -45,10 +45,10 @@ final class LegacyProviderPdfBackend extends PdfBackendBase implements Container
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\fillpdf\Plugin\LegacyFillPdfBackendManager $legacy_backend_manager
+   * @param \Drupal\fillpdf_legacy\Plugin\FillPdfBackendManager $legacy_backend_manager
    *   The FillPDF legacy backend manager.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, LegacyFillPdfBackendManager $legacy_backend_manager) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, FillPdfBackendManager $legacy_backend_manager) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->legacyBackend = $legacy_backend_manager->createInstance($configuration['backend'], $configuration);
   }
diff --git a/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php b/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php
new file mode 100644
index 0000000..2c37481
--- /dev/null
+++ b/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Drupal\Tests\fillpdf_legacy\Kernel;
+
+use Drupal\Tests\fillpdf\Kernel\FillPdfKernelTestBase;
+
+/**
+ * Tests that backend-related functions work.
+ *
+ * @group fillpdf
+ * @legacy
+ */
+class LegacyBackendTest extends FillPdfKernelTestBase {
+
+  public function testTestBackend() {
+    $backend_manager = $this->container->get('plugin.manager.fillpdf.pdf_backend');
+    $test_backend = $backend_manager->createInstance('test');
+    self::assertEquals('Drupal\fillpdf_legacy\Plugin\PdfBackend\LegacyProviderPdfBackend', get_class($test_backend));
+  }
+
+}
diff --git a/src/Form/FillPdfSettingsForm.php b/src/Form/FillPdfSettingsForm.php
index d5a0031..a207f82 100644
--- a/src/Form/FillPdfSettingsForm.php
+++ b/src/Form/FillPdfSettingsForm.php
@@ -361,15 +361,6 @@ class FillPdfSettingsForm extends ConfigFormBase {
           $form_state->setErrorByName('pdftk_path', $error_message);
         }
         break;
-
-      case 'local':
-        // Check for JavaBridge.
-        $status = file_exists(drupal_get_path('module', 'fillpdf') . '/lib/JavaBridge/java/Java.inc');
-        if ($status === FALSE) {
-          $error_message = $this->t('JavaBridge is not installed locally.');
-          $form_state->setErrorByName('local', $error_message);
-        }
-        break;
     }
 
     $template_scheme = $values['template_scheme'];
diff --git a/src/Plugin/BackendServiceBase.php b/src/Plugin/BackendServiceBase.php
index 7cd4f6b..64543ee 100644
--- a/src/Plugin/BackendServiceBase.php
+++ b/src/Plugin/BackendServiceBase.php
@@ -3,6 +3,7 @@
 namespace Drupal\fillpdf\Plugin;
 
 use Drupal\Component\Plugin\PluginBase;
+use Drupal\fillpdf_legacy\Plugin\BackendServiceInterface;
 
 /**
  * Base class for FillPDF BackendService plugins.
diff --git a/src/Plugin/PdfBackendManager.php b/src/Plugin/PdfBackendManager.php
index b229e03..f7bb434 100644
--- a/src/Plugin/PdfBackendManager.php
+++ b/src/Plugin/PdfBackendManager.php
@@ -41,9 +41,8 @@ class PdfBackendManager extends DefaultPluginManager implements FallbackPluginMa
     // Get all plugin definitions of this type.
     $definitions = parent::getDefinitions();
 
-    // Add legacy plugin definitions, but unset the legacy plugin provider.
+    // Unset the legacy plugin provider.
     // @todo Remove in fillpdf:8.x-5.x.
-    $definitions += \Drupal::service('plugin.manager.fillpdf_backend')->getDefinitions();
     unset($definitions['legacy_provider']);
 
     // Sort plugins by weight.
diff --git a/tests/modules/fillpdf_test/fillpdf_test.info.yml b/tests/modules/fillpdf_test/fillpdf_test.info.yml
index e1ca9b8..904c318 100644
--- a/tests/modules/fillpdf_test/fillpdf_test.info.yml
+++ b/tests/modules/fillpdf_test/fillpdf_test.info.yml
@@ -5,4 +5,4 @@ core: 8.x
 package: Testing
 version: VERSION
 dependencies:
-  - fillpdf:fillpdf
+  - fillpdf:fillpdf_legacy
diff --git a/tests/src/Functional/UninstallTest.php b/tests/src/Functional/UninstallTest.php
index a34e7a4..63da225 100644
--- a/tests/src/Functional/UninstallTest.php
+++ b/tests/src/Functional/UninstallTest.php
@@ -69,7 +69,7 @@ class UninstallTest extends BrowserTestBase {
     $this->assertSession()->pageTextContains('There are 0 fillpdf form field entities to delete');
 
     // Now go back to the uninstall page and uninstall fillpdf_test and fillpdf.
-    foreach (['fillpdf_test', 'fillpdf'] as $module) {
+    foreach (['fillpdf_test', 'fillpdf_legacy', 'fillpdf'] as $module) {
       $this->drupalPostForm(Url::fromRoute('system.modules_uninstall'), ["uninstall[$module]" => TRUE], 'Uninstall');
       $this->assertSession()->pageTextContains('The following modules will be completely uninstalled from your site, and all data from these modules will be lost');
       $this->drupalPostForm(NULL, [], 'Uninstall');
diff --git a/tests/src/Kernel/FillPdfBackendTest.php b/tests/src/Kernel/FillPdfBackendTest.php
deleted file mode 100644
index 09440cf..0000000
--- a/tests/src/Kernel/FillPdfBackendTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace Drupal\Tests\fillpdf\Kernel;
-
-/**
- * Tests that backend-related functions work.
- *
- * @group fillpdf
- */
-class FillPdfBackendTest extends FillPdfKernelTestBase {
-
-  public function testTestBackend() {
-    $backend_manager = $this->container->get('plugin.manager.fillpdf.pdf_backend');
-    $test_backend = $backend_manager->createInstance('test');
-    self::assertEquals('Drupal\fillpdf\Plugin\PdfBackend\LegacyProviderPdfBackend', get_class($test_backend));
-  }
-
-}
-- 
GitLab