From 90143d00e1b1ca8eab404e84ac25f29c602fee1e Mon Sep 17 00:00:00 2001 From: Bill Blume Date: Fri, 1 Jun 2018 11:31:16 -0700 Subject: [PATCH] Comment and name fixes to unit test * Renamed the test script to reflect that it tests all workbook bookview attributes, not just the 'showSheetTabs' attribute. * Rewrote the comment for the test case to indicate that it tests all workbook bookvview attributes. --- .../{HiddenTabsTest.php => WorkbookViewAttrsTest.php} | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) rename tests/PhpSpreadsheetTests/Writer/Xlsx/{HiddenTabsTest.php => WorkbookViewAttrsTest.php} (84%) diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/HiddenTabsTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/WorkbookViewAttrsTest.php similarity index 84% rename from tests/PhpSpreadsheetTests/Writer/Xlsx/HiddenTabsTest.php rename to tests/PhpSpreadsheetTests/Writer/Xlsx/WorkbookViewAttrsTest.php index 7c741252c7..8287bdaca9 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/HiddenTabsTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/WorkbookViewAttrsTest.php @@ -6,7 +6,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet; use PHPUnit\Framework\TestCase; -class HiddenTabsTest extends TestCase +class WorkbookViewAttrsTest extends TestCase { /** * Copy of PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook::$bookViewAttributes @@ -27,10 +27,13 @@ class HiddenTabsTest extends TestCase ]; /** - * Test that the worksheet tabs remain hidden when reading and writing a XLSX document - * with hidden worksheets tabs. + * Test that workbook bookview attributes such as 'showSheetTabs', + * (the attribute controlling worksheet tabs visibility,) + * are preserved when xlsx documents are read and written. + * + * @see https://github.com/PHPOffice/PhpSpreadsheet/issues/523 */ - public function testUpdateWithHiddenTabs() + public function testPreserveWorkbookViewAttributes() { // Create a dummy workbook with two worksheets $workbook = new Spreadsheet();