You are here

protected function TestFillPdfTrait::configureLocalServiceBackend in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 tests/src/Traits/TestFillPdfTrait.php \Drupal\Tests\fillpdf\Traits\TestFillPdfTrait::configureLocalServiceBackend()

Configures the FillPdf local service backend.

2 calls to TestFillPdfTrait::configureLocalServiceBackend()
PdfParseTest::testParseLocalService in tests/src/Functional/PdfParseTest.php
Tests PDF population using local service.
PdfPopulationTest::testMergeLocalService in tests/src/Functional/PdfPopulationTest.php
Tests PDF population using local service.

File

tests/src/Traits/TestFillPdfTrait.php, line 54

Class

TestFillPdfTrait
Provides methods for testing FillPdf.

Namespace

Drupal\Tests\fillpdf\Traits

Code

protected function configureLocalServiceBackend() {

  // Configure our local filling service. You need to set up your development
  // environment to run the Docker container at http://127.0.0.1:8085 if you
  // are developing for FillPDF and want to run this test. This can be
  // overridden with the FILLPDF_LOCAL_SERVER environment variable in
  // phpunit.xml.
  $localServerEndpoint = getenv('FILLPDF_LOCAL_SERVER');
  $edit = [
    'template_scheme' => 'public',
    'backend' => 'local_service',
    'local_service_endpoint' => $localServerEndpoint ?: 'http://127.0.0.1:8085',
  ];
  $this
    ->drupalPostForm('admin/config/media/fillpdf', $edit, t('Save configuration'));
}