You are here

protected function FillPdfTestHelper::uploadTestPdf in FillPDF 7

Uploads a PDF test file.

3 calls to FillPdfTestHelper::uploadTestPdf()
FillPdfMergeTestCase::backendTest in tests/FillPdfMergeTestCase.test
Tests PDF merging.
FillPdfMergeTestCase::testPdfMerging in tests/FillPdfMergeTestCase.test
Test PDF merging.
FillPdfTestCase::testFileAccess in tests/FillPdfTestCase.test
Make sure that file access works properly.

File

tests/FillPdfTestHelper.test, line 34

Class

FillPdfTestHelper
Helper functions for FillPDF testing.

Code

protected function uploadTestPdf() {
  $this
    ->drupalPost('admin/structure/fillpdf', array(
    'files[upload_pdf]' => drupal_realpath(drupal_get_path('module', 'fillpdf') . '/tests/fillpdf_test_v4.pdf'),
  ), t('Upload'));
  $this
    ->assertText('fillpdf_test_v4.pdf was successfully uploaded.');
  $this
    ->assertResponse(200, 'No integrity constraint violation.');
}