File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
tests/PhpSpreadsheetTests/Reader/Xls Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 44
55namespace PhpOffice \PhpSpreadsheetTests \Reader \Xls ;
66
7+ use PhpOffice \PhpSpreadsheet \Exception as PhpSpreadsheetException ;
78use PhpOffice \PhpSpreadsheet \Reader \Xls ;
89use PhpOffice \PhpSpreadsheet \Shared \CodePage ;
910use 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 ();
You can’t perform that action at this time.
0 commit comments