public function EntityPrintTest::generateFilenameDataProvider in Entity Print 8
Get the data for testing filename generation.
Return value
array An array of data rows for testing filename generation.
File
- tests/
src/ Unit/ EntityPrintTest.php, line 58
Class
- EntityPrintTest
- @coversDefaultClass \Drupal\entity_print\EntityPrintPdfBuilder @group entity_print
Namespace
Drupal\Tests\entity_print\UnitCode
public function generateFilenameDataProvider() {
return [
// $node_title, $expected_filename.
[
'Random Node Title',
'Random Node Title.pdf',
],
[
'Title -=with special chars&*#',
'Title with special chars.pdf',
],
[
'Title 5 with Nums 2',
'Title 5 with Nums 2.pdf',
],
];
}