mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-11 18:46:49 +00:00
b2d572c8bb
* Fix missing font index with some XLS files * Add test case * Improve Test --------- Co-authored-by: JC <jcopin@nodevo.com> Co-authored-by: jenasnic
24 lines
632 B
PHP
24 lines
632 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xls;
|
|
|
|
use PhpOffice\PhpSpreadsheet\IOFactory;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class XlsBugPr3734Test extends TestCase
|
|
{
|
|
/**
|
|
* Test XLS file including data with missing fonts?
|
|
*/
|
|
public function testXlsFileWithNoFontIndex(): void
|
|
{
|
|
$fileName = 'tests/data/Reader/XLS/bug-pr-3734.xls';
|
|
$spreadsheet = IOFactory::load($fileName);
|
|
$sheet = $spreadsheet->getActiveSheet();
|
|
self::assertSame('Calibri', $sheet->getStyle('A1')->getFont()->getName());
|
|
$spreadsheet->disconnectWorksheets();
|
|
}
|
|
}
|