Skip to content

Commit acba6d1

Browse files
committed
Additional Test
1 parent 07150fc commit acba6d1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/PhpSpreadsheetTests/Reader/Xls/InfoNamesTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xls;
66

7+
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
78
use PhpOffice\PhpSpreadsheet\Reader\Xls;
89
use PhpOffice\PhpSpreadsheet\Shared\CodePage;
910
use PHPUnit\Framework\TestCase;
@@ -128,6 +129,14 @@ public function testWorksheetNamesBiff5Special(): void
128129
self::assertSame($expected, $names);
129130
}
130131

132+
public function testBadCodePage(): void
133+
{
134+
$this->expectException(PhpSpreadsheetException::class);
135+
$this->expectExceptionMessage('Unknown codepage');
136+
$reader = new Xls();
137+
$reader->setCodePage('XXXCP855');
138+
}
139+
131140
public function testLoadMacCentralEuropeBiff5(): void
132141
{
133142
$reader = new Xls();

0 commit comments

Comments
 (0)