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 4
4
5
5
namespace PhpOffice \PhpSpreadsheetTests \Reader \Xls ;
6
6
7
+ use PhpOffice \PhpSpreadsheet \Exception as PhpSpreadsheetException ;
7
8
use PhpOffice \PhpSpreadsheet \Reader \Xls ;
8
9
use PhpOffice \PhpSpreadsheet \Shared \CodePage ;
9
10
use PHPUnit \Framework \TestCase ;
@@ -128,6 +129,14 @@ public function testWorksheetNamesBiff5Special(): void
128
129
self ::assertSame ($ expected , $ names );
129
130
}
130
131
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
+
131
140
public function testLoadMacCentralEuropeBiff5 (): void
132
141
{
133
142
$ reader = new Xls ();
You can’t perform that action at this time.
0 commit comments