fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -8,9 +8,7 @@ use Dompdf\Options;
class SlipPrinterPdfService
{
public function __construct(private SlipPrinterConfigService $configService)
{
}
public function __construct(private SlipPrinterConfigService $configService) {}
public function render(array $data, array $lines, array $options = []): array
{
@@ -63,7 +61,7 @@ class SlipPrinterPdfService
'h_mm' => $hMm,
]);
$optionsObj = new Options();
$optionsObj = new Options;
$optionsObj->set('isRemoteEnabled', true);
$optionsObj->set('defaultFont', 'Courier');
@@ -76,7 +74,7 @@ class SlipPrinterPdfService
$dompdf->setPaper([0, 0, $wPt, $hPt]);
$dompdf->render();
$filename = 'LateSlip_' . preg_replace('/[^A-Za-z0-9]+/', '_', (string) ($data['student_name'] ?? 'slip')) . '_' . date('Ymd_His') . '.pdf';
$filename = 'LateSlip_'.preg_replace('/[^A-Za-z0-9]+/', '_', (string) ($data['student_name'] ?? 'slip')).'_'.date('Ymd_His').'.pdf';
return [
'content' => $dompdf->output(),