Skip to content
Snippets Groups Projects
Commit 959af256 authored by Liam Morland's avatar Liam Morland
Browse files

Issue #2957163 by Liam Morland: Test for PDF upload controls

parent 90bddf2b
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,12 @@ class FillPdfTestCase extends FileFieldTestCase { ...@@ -43,7 +43,12 @@ class FillPdfTestCase extends FileFieldTestCase {
* *
*/ */
public function testPdfUpload() { public function testPdfUpload() {
$this->configureBackend();
$this->drupalGet('admin/structure/fillpdf'); $this->drupalGet('admin/structure/fillpdf');
$this->assertFieldByXPath('//input[@id="edit-upload-pdf"]', NULL, 'PDF upload component exists.');
$this->assertFieldByXPath('//input[@id="edit-upload-pdf"][@type="file"]', NULL, 'PDF upload component has appropriate attributes.');
} }
/** /**
...@@ -147,6 +152,9 @@ class FillPdfTestCase extends FileFieldTestCase { ...@@ -147,6 +152,9 @@ class FillPdfTestCase extends FileFieldTestCase {
// Upload a template. // Upload a template.
$this->uploadTestPdf(); $this->uploadTestPdf();
$this->assertFieldByXPath('//input[@id="edit-upload-pdf"]', NULL, 'PDF update component exists.');
$this->assertFieldByXPath('//input[@id="edit-upload-pdf"][@type="file"]', NULL, 'PDF update component has appropriate attributes.');
$fid = $this->getLatestFillPdfForm(); $fid = $this->getLatestFillPdfForm();
db_update('fillpdf_forms') db_update('fillpdf_forms')
->fields(array('destination_path' => 'output')) ->fields(array('destination_path' => 'output'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment