public function FillPdfNodeTestCase::testNodeLink in FillPDF 7
Test fillpdf_context_to_link() with nodes.
File
- tests/
FillPdfNodeTestCase.test, line 54
Class
- FillPdfNodeTestCase
- Tests parsing links for nodes.
Code
public function testNodeLink() {
$base_context = array(
'nodes' => array(),
'webforms' => array(),
'uc_orders' => array(),
'uc_order_products' => array(),
'entities' => array(),
);
foreach ($this
->dataProvider() as $test_case) {
list($name, $nodes, $expected) = $test_case;
// Ensure links were correctly created from context.
$context = array(
'nodes' => $nodes,
) + $base_context;
$output = rawurldecode(fillpdf_context_to_link(1, $context));
$this
->assertEqual($expected, $output, t($this->message, array(
'%name' => $name,
'%output' => $output,
'%expected' => $expected,
)));
}
}