From ff3f9aa325cfc84d3d77f3c400b9f1dec4b5fe8e Mon Sep 17 00:00:00 2001 From: wizonesolutions <wizonesolutions@739994.no-reply.drupal.org> Date: Wed, 22 Apr 2020 21:42:06 +0200 Subject: [PATCH] Issue #3114541 by wizonesolutions: Fix coding standards issues --- fillpdf.links.task.yml | 1 - modules/fillpdf_legacy/fillpdf_legacy.module | 1 + .../BackendService/LocalServerBackendService.php | 1 - .../tests/Kernel/LegacyBackendTest.php | 5 ++++- src/Component/Utility/FillPdf.php | 2 +- src/EntityHelperInterface.php | 2 +- src/FillPdfAdminFormHelperInterface.php | 3 +++ src/FillPdfFileContextAccessControlHandler.php | 10 ++++++++-- src/Form/FillPdfFormConfirmFormBase.php | 13 ------------- src/Form/FillPdfFormForm.php | 2 +- src/InputHelper.php | 2 +- src/Plugin/FillPdfActionPluginBase.php | 2 +- .../PdfBackend/FillPdfServicePdfBackend.php | 3 ++- src/Plugin/PdfBackend/PdftkPdfBackend.php | 3 ++- src/Service/FillPdfAdminFormHelper.php | 2 ++ src/Service/FillPdfContextManager.php | 10 ++++------ .../src/Plugin/BackendService/Test.php | 2 ++ .../Plugin/FillPdfBackend/TestFillPdfBackend.php | 2 ++ .../src/Functional/FillPdfFormDeleteFormTest.php | 7 +++++++ .../Functional/FillPdfFormDuplicateFormTest.php | 7 +++++++ .../src/Functional/FillPdfFormImportFormTest.php | 7 +++++++ tests/src/Functional/FillPdfSettingsFormTest.php | 4 ++++ tests/src/Functional/FillPdfTestBase.php | 2 +- tests/src/Functional/LinkManipulatorTest.php | 7 +++++++ tests/src/Functional/PdfParseTest.php | 8 +++++++- tests/src/Functional/UninstallTest.php | 7 +++++++ tests/src/Traits/TestImageFieldTrait.php | 16 ++++++++-------- .../Unit/FieldMapping/ImageFieldMappingTest.php | 8 +++++--- .../Unit/FieldMapping/TextFieldMappingTest.php | 8 +++++--- 29 files changed, 100 insertions(+), 47 deletions(-) diff --git a/fillpdf.links.task.yml b/fillpdf.links.task.yml index a401620..ee502ad 100644 --- a/fillpdf.links.task.yml +++ b/fillpdf.links.task.yml @@ -9,4 +9,3 @@ fillpdf.settings: route_name: fillpdf.settings base_route: fillpdf.forms_admin weight: 30 - diff --git a/modules/fillpdf_legacy/fillpdf_legacy.module b/modules/fillpdf_legacy/fillpdf_legacy.module index 30540d2..abb6c36 100644 --- a/modules/fillpdf_legacy/fillpdf_legacy.module +++ b/modules/fillpdf_legacy/fillpdf_legacy.module @@ -2,6 +2,7 @@ /** * @file + * Legacy functionality and plugins. */ use Drupal\Core\Form\FormStateInterface; diff --git a/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php b/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php index d667238..95bfdb0 100644 --- a/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php +++ b/modules/fillpdf_legacy/src/Plugin/BackendService/LocalServerBackendService.php @@ -4,7 +4,6 @@ namespace Drupal\fillpdf_legacy\Plugin\BackendService; use Drupal\Core\File\FileSystem; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\fillpdf\Plugin\BackendServiceBase; use Drupal\fillpdf\Plugin\PdfBackendManager; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php b/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php index e721327..1deebf9 100644 --- a/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php +++ b/modules/fillpdf_legacy/tests/Kernel/LegacyBackendTest.php @@ -13,10 +13,13 @@ use Drupal\Tests\fillpdf\Kernel\FillPdfKernelTestBase; */ class LegacyBackendTest extends FillPdfKernelTestBase { + /** + * {@inheritdoc} + */ public static $modules = ['fillpdf_legacy']; /** - * + * Tests the legacy test backend. */ public function testTestBackend() { $backend_manager = $this->container->get('plugin.manager.fillpdf.pdf_backend'); diff --git a/src/Component/Utility/FillPdf.php b/src/Component/Utility/FillPdf.php index 1233e42..c8863a4 100644 --- a/src/Component/Utility/FillPdf.php +++ b/src/Component/Utility/FillPdf.php @@ -83,7 +83,7 @@ class FillPdf { */ public static function buildFileUri($scheme, $path) { $uri = $scheme . '://' . $path; - /** @var StreamWrapperManagerInterface $streamWrapperManager */ + /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager */ $streamWrapperManager = \Drupal::service('stream_wrapper_manager'); // @todo: Remove once Drupal 8.7 is no longer supported. if (!method_exists(StreamWrapperManagerInterface::class, 'normalizeUri')) { diff --git a/src/EntityHelperInterface.php b/src/EntityHelperInterface.php index 078d12c..5b259c3 100644 --- a/src/EntityHelperInterface.php +++ b/src/EntityHelperInterface.php @@ -6,7 +6,7 @@ namespace Drupal\fillpdf; * Interface EntityHelperInterface. * * @package Drupal\fillpdf - * @deprecated in FillPDF 8.x-4.7 and is removed from FillPDF 8.x-5.0. Applies + * @deprecated in fillpdf:8.x-4.7 and is removed from fillpdf:8.x-5.0. Applies * to this interface and the 'fillpdf.entity_helper' service. * @see https://www.drupal.org/project/fillpdf/issues/3046257 */ diff --git a/src/FillPdfAdminFormHelperInterface.php b/src/FillPdfAdminFormHelperInterface.php index 36ad10a..bcf42b8 100644 --- a/src/FillPdfAdminFormHelperInterface.php +++ b/src/FillPdfAdminFormHelperInterface.php @@ -43,7 +43,10 @@ interface FillPdfAdminFormHelperInterface { public function getFormsByTemplateScheme($scheme); /** + * Returns the help text for FillPDF replacements. + * * @return \Drupal\Core\StringTranslation\TranslatableMarkup + * The help text. */ public static function getReplacementsDescription(); diff --git a/src/FillPdfFileContextAccessControlHandler.php b/src/FillPdfFileContextAccessControlHandler.php index 28e21f0..e91bece 100644 --- a/src/FillPdfFileContextAccessControlHandler.php +++ b/src/FillPdfFileContextAccessControlHandler.php @@ -18,22 +18,28 @@ use Symfony\Component\DependencyInjection\ContainerInterface; class FillPdfFileContextAccessControlHandler extends EntityAccessControlHandler implements EntityHandlerInterface { /** + * The access helper. + * * @var \Drupal\fillpdf\FillPdfAccessHelperInterface */ protected $accessHelper; /** + * The link manipulator. + * * @var FillPdfLinkManipulatorInterface */ protected $linkManipulator; /** + * The FillPDF context manager. + * * @var FillPdfContextManagerInterface */ protected $contextManager; /** - * + * {@inheritdoc} */ public function __construct(EntityTypeInterface $entity_type, FillPdfAccessHelperInterface $access_helper, FillPdfLinkManipulatorInterface $link_manipulator, FillPdfContextManagerInterface $context_manager) { parent::__construct($entity_type); @@ -44,7 +50,7 @@ class FillPdfFileContextAccessControlHandler extends EntityAccessControlHandler } /** - * + * {@inheritdoc} */ public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { return new static($entity_type, $container->get('fillpdf.access_helper'), $container->get('fillpdf.link_manipulator'), $container->get('fillpdf.context_manager')); diff --git a/src/Form/FillPdfFormConfirmFormBase.php b/src/Form/FillPdfFormConfirmFormBase.php index 2c67334..df7b98f 100644 --- a/src/Form/FillPdfFormConfirmFormBase.php +++ b/src/Form/FillPdfFormConfirmFormBase.php @@ -12,19 +12,6 @@ use Drupal\Core\Form\FormStateInterface; */ abstract class FillPdfFormConfirmFormBase extends ContentEntityConfirmFormBase { - /** - * Gets the FillPdfForm. - * - * The FillPdfForm entity used for populating form element defaults. - * - * @return \Drupal\fillpdf\FillPdfFormInterface - * The current FillPdfForm entity. - */ - public function getEntity() { - // This wrapper is here to add a proper typehint to EntityForm::getEntity(). - return parent::getEntity(); - } - /** * {@inheritdoc} */ diff --git a/src/Form/FillPdfFormForm.php b/src/Form/FillPdfFormForm.php index d4d97e8..c03efdc 100644 --- a/src/Form/FillPdfFormForm.php +++ b/src/Form/FillPdfFormForm.php @@ -282,7 +282,7 @@ class FillPdfFormForm extends ContentEntityForm { '#type' => 'item', '#title' => $this->t('Sample PDF'), '#description' => $this->t('@link<br />If you have set a custom path on this PDF, the sample will be saved there silently.', [ - '@link' => Link::fromTextAndUrl( + '@link' => Link::fromTextAndUrl( $this->t('See which fields are which in this PDF.'), $this->linkManipulator->generateLink([ 'fid' => $fid, diff --git a/src/InputHelper.php b/src/InputHelper.php index 11c86c8..0a11f4b 100644 --- a/src/InputHelper.php +++ b/src/InputHelper.php @@ -125,7 +125,7 @@ class InputHelper implements InputHelperInterface { * @see \Drupal\file\FileInterface */ protected function saveFileUpload(FileInterface $file) { - @trigger_error('InputHelper::saveFileUpload() is deprecated in fillpdf:8.x-4.7 and is removed from fillpdf:8.x-5.0. Use \Drupal\file\FileInterface::setPermanent() and \Drupal\file\FileInterface::save() instead. See https://www.drupal.org/project/fillpdf/issues/3055123.', E_USER_DEPRECATED); + @trigger_error('InputHelper::saveFileUpload() is deprecated in fillpdf:8.x-4.7 and is removed from fillpdf:8.x-5.0. Use \Drupal\file\FileInterface::setPermanent() and \Drupal\file\FileInterface::save() instead. See https://www.drupal.org/project/fillpdf/issues/3055123', E_USER_DEPRECATED); $file->setPermanent(); $file->save(); } diff --git a/src/Plugin/FillPdfActionPluginBase.php b/src/Plugin/FillPdfActionPluginBase.php index 8ae90d3..18ee104 100644 --- a/src/Plugin/FillPdfActionPluginBase.php +++ b/src/Plugin/FillPdfActionPluginBase.php @@ -37,7 +37,7 @@ abstract class FillPdfActionPluginBase extends PluginBase implements FillPdfActi * @see \Drupal\Component\Plugin\ConfigurableInterface::getConfiguration() */ public function getConfiguration() { - @trigger_error('FillPdfActionPluginInterface::getConfiguration() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862.', E_USER_DEPRECATED); + @trigger_error('FillPdfActionPluginInterface::getConfiguration() is deprecated in fillpdf:8.x-4.8 and is removed from fillpdf:8.x-5.0. Custom FillPdfActionPlugins may extend ConfigurableInterface instead. See https://www.drupal.org/project/fillpdf/issues/3058862', E_USER_DEPRECATED); return $this->configuration; } diff --git a/src/Plugin/PdfBackend/FillPdfServicePdfBackend.php b/src/Plugin/PdfBackend/FillPdfServicePdfBackend.php index b3f6023..d2ad931 100644 --- a/src/Plugin/PdfBackend/FillPdfServicePdfBackend.php +++ b/src/Plugin/PdfBackend/FillPdfServicePdfBackend.php @@ -17,7 +17,8 @@ use Drupal\fillpdf\Plugin\PdfBackendBase; * id = "fillpdf_service", * label = @Translation("FillPDF Service"), * description = @Translation( - * "No technical prerequisites. Sign up for <a href=':url'>FillPDF Service</a>.", + * "No technical prerequisites. + * Sign up for <a href=':url'>FillPDF Service</a>.", * arguments = { * ":url" = "https://fillpdf.io" * } diff --git a/src/Plugin/PdfBackend/PdftkPdfBackend.php b/src/Plugin/PdfBackend/PdftkPdfBackend.php index dfbcafd..da50836 100644 --- a/src/Plugin/PdfBackend/PdftkPdfBackend.php +++ b/src/Plugin/PdfBackend/PdftkPdfBackend.php @@ -24,7 +24,8 @@ use Drupal\Core\File\FileSystemInterface; * id = "pdftk", * label = @Translation("pdftk"), * description = @Translation( - * "Locally installed pdftk. You will need a VPS or a dedicated server to install pdftk, see <a href=':url'>documentation</a>.", + * "Locally installed pdftk. You will need a VPS or a dedicated server to + * install pdftk, see <a href=':url'>documentation</a>.", * arguments = { * ":url" = "https://www.drupal.org/docs/8/modules/fillpdf" * } diff --git a/src/Service/FillPdfAdminFormHelper.php b/src/Service/FillPdfAdminFormHelper.php index 1ea6096..7859d03 100644 --- a/src/Service/FillPdfAdminFormHelper.php +++ b/src/Service/FillPdfAdminFormHelper.php @@ -127,6 +127,8 @@ class FillPdfAdminFormHelper implements FillPdfAdminFormHelperInterface { * * @deprecated in fillpdf:8.x-4.9 and is removed from fillpdf:8.x-5.0. Use the * PdfBackend plugin's own methods. + * + * @see https://www.drupal.org/node/3060086 * @see \Drupal\fillpdf\Plugin\PdfBackend\PdftkPdfBackend */ public function getPdftkPath() { diff --git a/src/Service/FillPdfContextManager.php b/src/Service/FillPdfContextManager.php index 35a3f51..fc27000 100644 --- a/src/Service/FillPdfContextManager.php +++ b/src/Service/FillPdfContextManager.php @@ -6,21 +6,19 @@ use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\fillpdf\FillPdfContextManagerInterface; /** - * + * Helper class to load entities from a FillPDF context array. */ class FillPdfContextManager implements FillPdfContextManagerInterface { /** - * @var \Drupal\Core\Entity\EntityTypeManagerInterface - * * The entity type manager. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** - * Constructs FillPdfContextManager. - * - * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * {@inheritdoc} */ public function __construct(EntityTypeManagerInterface $entity_type_manager) { $this->entityTypeManager = $entity_type_manager; diff --git a/tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php b/tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php index 7ccc724..78f3478 100644 --- a/tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php +++ b/tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php @@ -8,6 +8,8 @@ use Drupal\fillpdf\Plugin\BackendServiceBase; use Symfony\Component\DependencyInjection\ContainerInterface; /** + * Backend used in tests. + * * @BackendService( * id = "test", * label = @Translation("FillPDF Test Backend Service"), diff --git a/tests/modules/fillpdf_test/src/Plugin/FillPdfBackend/TestFillPdfBackend.php b/tests/modules/fillpdf_test/src/Plugin/FillPdfBackend/TestFillPdfBackend.php index c6e68d9..f532624 100644 --- a/tests/modules/fillpdf_test/src/Plugin/FillPdfBackend/TestFillPdfBackend.php +++ b/tests/modules/fillpdf_test/src/Plugin/FillPdfBackend/TestFillPdfBackend.php @@ -9,6 +9,8 @@ use Drupal\fillpdf\FillPdfFormInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** + * Backend used in tests. + * * @Plugin( * id = "test", * label = @Translation("Pass-through plugin for testing") diff --git a/tests/src/Functional/FillPdfFormDeleteFormTest.php b/tests/src/Functional/FillPdfFormDeleteFormTest.php index 8387fc0..4512237 100644 --- a/tests/src/Functional/FillPdfFormDeleteFormTest.php +++ b/tests/src/Functional/FillPdfFormDeleteFormTest.php @@ -16,7 +16,14 @@ class FillPdfFormDeleteFormTest extends BrowserTestBase { use TestFillPdfTrait; + /** + * {@inheritdoc} + */ static public $modules = ['fillpdf_test']; + + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/tests/src/Functional/FillPdfFormDuplicateFormTest.php b/tests/src/Functional/FillPdfFormDuplicateFormTest.php index 4365952..b78a000 100644 --- a/tests/src/Functional/FillPdfFormDuplicateFormTest.php +++ b/tests/src/Functional/FillPdfFormDuplicateFormTest.php @@ -16,7 +16,14 @@ class FillPdfFormDuplicateFormTest extends BrowserTestBase { use TestFillPdfTrait; + /** + * {@inheritdoc} + */ static public $modules = ['fillpdf_test']; + + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/tests/src/Functional/FillPdfFormImportFormTest.php b/tests/src/Functional/FillPdfFormImportFormTest.php index 65510fd..2d25e99 100644 --- a/tests/src/Functional/FillPdfFormImportFormTest.php +++ b/tests/src/Functional/FillPdfFormImportFormTest.php @@ -14,7 +14,14 @@ class FillPdfFormImportFormTest extends BrowserTestBase { use TestFillPdfTrait; + /** + * {@inheritdoc} + */ static public $modules = ['fillpdf_test']; + + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/tests/src/Functional/FillPdfSettingsFormTest.php b/tests/src/Functional/FillPdfSettingsFormTest.php index bfe84bd..7ac85df 100644 --- a/tests/src/Functional/FillPdfSettingsFormTest.php +++ b/tests/src/Functional/FillPdfSettingsFormTest.php @@ -11,6 +11,10 @@ use Drupal\Tests\fillpdf\Traits\TestFillPdfTrait; * @group fillpdf */ class FillPdfSettingsFormTest extends BrowserTestBase { + + /** + * {@inheritdoc} + */ public static $modules = ['fillpdf_test', 'file_test']; use TestFillPdfTrait; diff --git a/tests/src/Functional/FillPdfTestBase.php b/tests/src/Functional/FillPdfTestBase.php index 6d61533..060a899 100644 --- a/tests/src/Functional/FillPdfTestBase.php +++ b/tests/src/Functional/FillPdfTestBase.php @@ -16,7 +16,7 @@ abstract class FillPdfTestBase extends FileFieldTestBase { use TestImageFieldTrait; /** - * @var string + * {@inheritdoc} */ protected $defaultTheme = 'stark'; diff --git a/tests/src/Functional/LinkManipulatorTest.php b/tests/src/Functional/LinkManipulatorTest.php index e682ff1..8ed4027 100644 --- a/tests/src/Functional/LinkManipulatorTest.php +++ b/tests/src/Functional/LinkManipulatorTest.php @@ -17,7 +17,14 @@ class LinkManipulatorTest extends BrowserTestBase { use TestFillPdfTrait; + /** + * {@inheritdoc} + */ static public $modules = ['fillpdf_test']; + + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/tests/src/Functional/PdfParseTest.php b/tests/src/Functional/PdfParseTest.php index 1b6ac17..b2fa8fb 100644 --- a/tests/src/Functional/PdfParseTest.php +++ b/tests/src/Functional/PdfParseTest.php @@ -125,10 +125,16 @@ class PdfParseTest extends FillPdfTestBase { } /** + * Get expected field count per backend. + * * Different backends process different types of fields. This method is used * by ::backendTest() to assert against the correct value. * - * @param $backend + * @param string $backend + * The backend. + * + * @return int + * The expected field count. */ protected function getExpectedFieldCount($backend) { // NOTE: Other bugs led me to believe this was the case, but it's kind of a diff --git a/tests/src/Functional/UninstallTest.php b/tests/src/Functional/UninstallTest.php index 703a8a2..17bb0ff 100644 --- a/tests/src/Functional/UninstallTest.php +++ b/tests/src/Functional/UninstallTest.php @@ -15,7 +15,14 @@ class UninstallTest extends BrowserTestBase { use TestFillPdfTrait; + /** + * {@inheritdoc} + */ static public $modules = ['fillpdf_test']; + + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/tests/src/Traits/TestImageFieldTrait.php b/tests/src/Traits/TestImageFieldTrait.php index 376a052..655e736 100644 --- a/tests/src/Traits/TestImageFieldTrait.php +++ b/tests/src/Traits/TestImageFieldTrait.php @@ -67,23 +67,23 @@ trait TestImageFieldTrait { * This is our own version of ImageFieldTestBase::createImageField() * only that it supports fieldable entity types other than nodes. * - * @param string $field_name + * @param string $field_name * The name of the new field (all lowercase), exclude the "field_" prefix. - * @param string $entity_type + * @param string $entity_type * The entity type this field will be added to. - * @param string $bundle + * @param string $bundle * The bundle this field will be added to. - * @param array $storage_settings + * @param array $storage_settings * (optional) A list of field storage settings that will be added to the * defaults. - * @param array $field_settings + * @param array $field_settings * (optional) A list of instance settings that will be added to the instance * defaults. - * @param array $widget_settings + * @param array $widget_settings * (optional) Widget settings to be added to the widget defaults. - * @param array $formatter_settings + * @param array $formatter_settings * (optional) Formatter settings to be added to the formatter defaults. - * @param string $description + * @param string $description * (optional) A description for the field. Defaults to ''. * * @return \Drupal\field\Entity\FieldConfig diff --git a/tests/src/Unit/FieldMapping/ImageFieldMappingTest.php b/tests/src/Unit/FieldMapping/ImageFieldMappingTest.php index de580ae..9a7b61f 100644 --- a/tests/src/Unit/FieldMapping/ImageFieldMappingTest.php +++ b/tests/src/Unit/FieldMapping/ImageFieldMappingTest.php @@ -6,15 +6,17 @@ use Drupal\fillpdf\FieldMapping\ImageFieldMapping; use Drupal\Tests\UnitTestCase; /** + * Test the ImageFieldMapping class. + * * @group fillpdf * @covers \Drupal\fillpdf\FieldMapping\ImageFieldMapping */ class ImageFieldMappingTest extends UnitTestCase { /** - * + * Test the constructor. */ - public function test__construct() { + public function testConstruct() { // Test valid and invalid instantiations. $image_field_mapping = new ImageFieldMapping('Dummy image', 'jpg'); self::assertInstanceOf(ImageFieldMapping::class, $image_field_mapping); @@ -24,7 +26,7 @@ class ImageFieldMappingTest extends UnitTestCase { } /** - * + * Test the getExtension() method. */ public function testGetExtension() { $image_field_mapping = new ImageFieldMapping('Dummy image', 'jpg'); diff --git a/tests/src/Unit/FieldMapping/TextFieldMappingTest.php b/tests/src/Unit/FieldMapping/TextFieldMappingTest.php index 5c3ac13..50b9226 100644 --- a/tests/src/Unit/FieldMapping/TextFieldMappingTest.php +++ b/tests/src/Unit/FieldMapping/TextFieldMappingTest.php @@ -6,22 +6,24 @@ use Drupal\fillpdf\FieldMapping\TextFieldMapping; use Drupal\Tests\UnitTestCase; /** + * Tests the TextFieldMapping class. + * * @group fillpdf * @covers \Drupal\fillpdf\FieldMapping\TextFieldMapping */ class TextFieldMappingTest extends UnitTestCase { /** - * + * Tests the constructor. */ - public function test__construct() { + public function testConstruct() { // Test valid and invalid instantiations. $text_field_mapping = new TextFieldMapping('Dummy text'); self::assertInstanceOf(TextFieldMapping::class, $text_field_mapping, 'Instantiation works.'); } /** - * + * Tests the getData() method. */ public function testGetData() { $text_field_mapping = new TextFieldMapping('Dummy text'); -- GitLab