/** * Write a stub to test a number of filename options * We won't be testing form or lead merge tag data at this stage * Just the basic naming convention (see common functions tests for full naming tests) * * @group configuration * @dataProvider provider_test_pdf_name */ public function test_pdf_name($test, $result) { $this->assertEquals(PDF_Common::validate_pdf_name($test), $result); }
public function get_pdf_name($id, $form_id = false, $lead_id = false) { if (isset($this->configuration[$id]['filename'])) { return PDF_Common::validate_pdf_name($this->configuration[$id]['filename'], $form_id, $lead_id); } else { return PDF_Common::validate_pdf_name(PDF_Common::get_pdf_filename($form_id, $lead_id), $form_id, $lead_id); } }