Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2216 resolve office365 auto filter structure move #2218

Merged
Prev Previous commit
Next Next commit
Basic unit tests to verify that the Xlsx Reader can read both the old…
…er and Office365 variants of the files used to store AutoFilter structure
  • Loading branch information
MarkBaker committed Jul 10, 2021
commit 2ab11c171e7d1ea6d16ba10c076f2aae63bafa7a
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace PhpOffice\PhpSpreadsheetTests\Features\AutoFilter\Xlsx;

use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use PHPUnit\Framework\TestCase;

class BasicLoadTest extends TestCase
{
public function testLoadAutoFilter()
{
$filename = 'tests/data/Features/AutoFilter/Xlsx/AutoFilter_Basic.xlsx';
$reader = new Xlsx();
$spreadsheet = $reader->load($filename);

$worksheet = $spreadsheet->getActiveSheet();
self::assertSame('A1:D57', $worksheet->getAutoFilter()->getRange());
}

public function testLoadOffice365AutoFilter()
{
$filename = 'tests/data/Features/AutoFilter/Xlsx/AutoFilter_Basic_Office365.xlsx';
$reader = new Xlsx();
$spreadsheet = $reader->load($filename);

$worksheet = $spreadsheet->getActiveSheet();
self::assertSame('A1:D57', $worksheet->getAutoFilter()->getRange());
}
}
Binary file not shown.
Binary file not shown.