You are here

protected function TestFillPdfTrait::getTestPdfPath 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::getTestPdfPath()

Gets the absolute local filepath of a PDF test file.

Parameters

string $filename: Filename of the PDF testfile.

Return value

string|false The absolute locale filepath or FALSE on failure.

4 calls to TestFillPdfTrait::getTestPdfPath()
FillPdfUploadTestBase::assertUploadPdfFile in tests/src/Functional/FillPdfUploadTestBase.php
Asserts that a PDF file may be properly uploaded as a template.
HandlePdfControllerTest::testDownloadAction in tests/src/Functional/HandlePdfControllerTest.php
Tests DownloadAction.
PdfPopulationTest::testProxyMerge in tests/src/Functional/PdfPopulationTest.php
Tests that merging with the backend proxy works.
TestFillPdfTrait::uploadTestPdf in tests/src/Traits/TestFillPdfTrait.php
Uploads a specified PDF testfile, if given.

File

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

Class

TestFillPdfTrait
Provides methods for testing FillPdf.

Namespace

Drupal\Tests\fillpdf\Traits

Code

protected function getTestPdfPath($filename) {

  /** @var \Drupal\Core\File\FileSystem $file_system */
  $file_system = $this->container
    ->get('file_system');
  return $file_system
    ->realpath(drupal_get_path('module', 'fillpdf') . '/tests/modules/fillpdf_test/files/' . $filename);
}