2 /* vim: set expandtab sw=4 ts=4 sts=4: */
6 * @package PhpMyAdmin-test
8 declare(strict_types
=1);
10 namespace PhpMyAdmin\Tests
;
12 use PhpMyAdmin\Config
;
14 use PhpMyAdmin\Tests\PmaTestCase
;
19 * @package PhpMyAdmin-test
21 class PdfTest
extends PmaTestCase
24 * SetUp for test cases
28 protected function setUp(): void
30 $GLOBALS['PMA_Config'] = new Config();
31 $GLOBALS['PMA_Config']->enableBc();
35 * Test for Pdf::getPDFData
40 public function testBasic()
43 $this->assertStringContainsString('PDF', $arr->getPDFData());
47 * Test for Pdf::getPDFData
52 public function testAlias()
55 $arr->setAlias('{00}', '32');
56 $this->assertStringContainsString('PDF', $arr->getPDFData());
60 * Test for Pdf::getPDFData
65 public function testDocument()
68 $pdf->SetTitle('Title');
70 $pdf->SetAutoPageBreak('auto');
72 $pdf->SetFont(Pdf
::PMA_PDF_FONT
, 'B', 14);
73 $pdf->Cell(0, 6, 'Cell', 'B', 1, 'C');
76 $pdf->Bookmark('Bookmark');
77 $pdf->SetMargins(0, 0);
78 $pdf->SetDrawColor(200, 200, 200);
79 $pdf->line(0, 0, 100, 100);
80 $this->assertStringContainsString('PDF', $pdf->getPDFData());