public function FillPdfNodeTestCase::testLegacyNodeLink in FillPDF 7
Test fillpdf_pdf_link() with a single node in legacy format.
Fillpdf_pdf_link() accepts a single nid being passed in as $nids. We're therefore separately testing single entity cases in this legacy format. All other cases are fully covered by testNodeLink().
File
- tests/
FillPdfNodeTestCase.test, line 87
Class
- FillPdfNodeTestCase
- Tests parsing links for nodes.
Code
public function testLegacyNodeLink() {
foreach ($this
->dataProvider() as $test_case) {
list($name, $nodes, $expected) = $test_case;
if (count($nodes) == 1) {
$node = reset($nodes);
$output = rawurldecode(fillpdf_pdf_link(1, $node->nid));
$this
->assertEqual($expected, $output, t($this->message, array(
'%name' => $name . ' (legacy format)',
'%output' => $output,
'%expected' => $expected,
)));
}
}
}