OctothorpeTest.php 597 B

1234567891011121314151617181920
  1. <?php
  2. namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;
  3. use PhpOffice\PhpSpreadsheet\IOFactory;
  4. use PHPUnit\Framework\TestCase;
  5. class OctothorpeTest extends TestCase
  6. {
  7. public function testOctothorpeInName(): void
  8. {
  9. // Permit # in file name.
  10. $filename = 'tests/data/Reader/XLSX/octo#thorpe.xlsx';
  11. $reader = IOFactory::createReader('Xlsx');
  12. $spreadsheet = $reader->load($filename);
  13. $sheet = $spreadsheet->getActiveSheet();
  14. self::assertSame('xyz', $sheet->getCell('A1')->getValue());
  15. $spreadsheet->disconnectWorksheets();
  16. }
  17. }