public function FillPdfLinkBooleansTestCase::testBooleans in FillPDF 7
Tests boolean query parameters.
File
- tests/
FillPdfLinkBooleansTestCase.test, line 31
Class
- FillPdfLinkBooleansTestCase
- Tests some unit test cases.
Code
public function testBooleans() {
foreach ($this
->dataProvider() as $case) {
foreach ($case as $input => $expected) {
$request_context = fillpdf_link_to_stub_context($this
->link($input));
$this
->assertEqual(is_null($expected) ? FALSE : $expected, $request_context['sample']);
$this
->assertEqual(is_null($expected) ? FALSE : $expected, $request_context['force_download']);
$this
->assertEqual(is_null($expected) ? TRUE : $expected, $request_context['flatten']);
}
}
}