PhpSpreadsheet/tests/PhpSpreadsheetTests/Reader/Xlsx
oleibman c0809b0c6c
Fix Spreadsheet Copy, Disable Clone, Improve Coverage (#2951)
* Fix Spreadsheet Copy, Disable Clone, Improve Coverage

This PR was supposed to be merely to increase coverage in Spreadsheet. However, in doing so, I discovered that neither clone nor copy worked correctly. Neither had been covered in the test suite. Copy not only did not work, it broke the source spreadsheet as well. I tried to debug and got nowhere; I even tried using myclabs/deep-copy which is already in use in the test suite, but it failed as well. However, write and reload ought to work just fine for copy. It can't be used for clone; however, since copy does what clone ought to do, there's no reason why clone needs to be used, so __clone is changed to throw an exception if attempted.

One other source change was needed, an obvious bug where an if condition uses 'or' when it should use 'and'. Also, one docblock declaration needed a change. Aside from that, the rest of this PR is test cases, and overall coverage passes 89% for the first time.

* Clone is Okay After All

But copy wasn't, changing it to just return clone. Perhaps save and reload will be needed instead at some point, but not yet.

* An Error I Cannot Reproduce

PHP8.1 unit test says error because GdImage can't be serialized. I can't reproduce this error on any of my test systems. I have no idea why GdImage is even involved. Using try/catch to see if it helps.

* Weird Failures in Github

I thought restoring clone was a good idea. That left me in a state where, after one change, copy/clone no longer worked on Github (unable to reproduce on any of my test systems). After a second change, copy worked but clone didn't, again unable to reproduce. So, reverting to original version - copy does save and reload, clone throws exception.
2022-07-28 07:03:26 -07:00
..
AbsolutePathTest.php Remove unnecessary changes. Added test 2021-04-19 11:25:48 +01:00
AutoFilter2Test.php Coverage Improvements (#2859) 2022-06-01 08:29:56 -07:00
AutoFilterEvaluateTest.php Xlsx Writer Unhides Explicitly Hidden Row in Filter Range - Minor Breaking Change (#2414) 2021-12-05 07:26:24 -08:00
AutoFilterTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
ChartSheetTest.php Add unit tests for ChartSheet reading 2022-05-16 13:30:30 +02:00
ColorTabTest.php Xlsx Reader Theme Support Broken After 17.1 (#2403) 2021-11-26 09:38:09 -08:00
CommentTest.php Corrections for Xlsx Read Comments (#2329) 2021-10-23 17:32:44 -07:00
CondNumFmtTest.php Move Reader Xlsx Tests from Reader to Reader/Xlsx Try 2 2021-06-17 09:45:11 -07:00
ConditionalFormattingDataBarXlsxTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
ConditionalTest.php #984 fix php-cs-fixer warnings 2021-05-11 12:44:40 +02:00
CoverageGapsTest.php Xlsx Reader Theme Support Broken After 17.1 (#2403) 2021-11-26 09:38:09 -08:00
DataValidationBooleanValue.php Fix test names per `composer check` 2021-07-21 05:53:49 -07:00
DefaultFillTest.php Resolve issue with conditional font size set to zero in PHP8 (#2073) 2021-05-07 12:53:59 +02:00
DefaultFontTest.php Resolve issue with conditional font size set to zero in PHP8 (#2073) 2021-05-07 12:53:59 +02:00
DrawingOneCellAnchorTest.php Fix loading drawing size (#2492) 2022-01-16 21:59:31 -08:00
EmptyFileTest.php Tweaks to Input File Validation (#2217) 2021-07-24 20:44:04 -07:00
ExplicitDateTest.php Handle Explicit "Date" Type for Cell (#2485) 2022-01-13 18:40:18 -08:00
HiddenWorksheetTest.php Add Hidden Worksheet unit tests for other Readers 2022-05-24 14:40:45 +02:00
HyperlinkTest.php Hyperlinks and Namespacing (#2391) 2021-11-14 10:27:59 -08:00
InvalidFileTest.php Tweaks to Input File Validation (#2217) 2021-07-24 20:44:04 -07:00
Issue2301Test.php Big Memory Leak in One Test (#2958) 2022-07-23 07:46:32 -07:00
Issue2331Test.php Unexpected Format in Timestamp (#2332) 2021-10-23 18:23:53 -07:00
Issue2362Test.php ZipArchive and "Inconsistent" Zip File (#2376) 2021-11-12 01:18:57 -08:00
Issue2387Test.php Xlsx Reader Theme Support Broken After 17.1 (#2403) 2021-11-26 09:38:09 -08:00
Issue2450Test.php General Style Specified in Uppercase in Input Xlsx (#2451) 2021-12-18 09:25:08 -08:00
Issue2488Test.php Xlsx Reader Cell DataType Numeric or Boolean Without Value (#2489) 2022-01-16 21:19:09 -08:00
Issue2490Test.php Reading Xlsx With Supplied Palette (#2595) 2022-02-23 22:09:22 -08:00
Issue2494Test.php Namespacing Phase 2 - Styles (#2471) 2022-02-11 06:42:04 -08:00
Issue2501Test.php Xlsx Reader Merge Range For Entire Column(s) or Row(s) (#2504) 2022-01-23 10:44:09 -08:00
Issue2516Test.php fix warning when open xlsx file with thumbnail (#2517) 2022-01-24 14:17:53 -08:00
Issue2542Test.php Xlsx Reader Warning When No sz Tag for RichText (#2550) 2022-02-12 06:43:29 -08:00
Issue2778Test.php Real Errors Identified in Calculation by Scrutinizer (#2774) 2022-04-30 19:13:17 -07:00
Issue2885Test.php Ignore square-$-brackets prefix in format string (#2886) 2022-06-15 14:55:17 -07:00
NamedRangeTest.php Fix for 3 Issues Involving ReadXlsx and NamedRange (#1742) 2020-12-10 18:08:10 +01:00
NamespaceIssue2109bTest.php Rename Two Test Files (#2459) 2021-12-25 09:05:54 -08:00
NamespaceNonStdTest.php Namespacing Phase 2 - Styles (#2471) 2022-02-11 06:42:04 -08:00
NamespaceOpenpyxl35Test.php Rename Two Test Files (#2459) 2021-12-25 09:05:54 -08:00
NamespacePurlTest.php Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
NamespaceStdTest.php Xlsx Reader Better Namespace Handling Phase 1 Try2 (#2173) 2021-06-25 09:05:49 +02:00
OctothorpeTest.php Read Spreadsheet with # in Name (#2409) 2021-11-30 07:39:50 -08:00
OddColumnReadFilter.php Merge branch 'master' into PHP8-Sane-Property-Names 2021-10-31 15:25:01 +09:00
PageSetup2Test.php Coverage Improvements (#2859) 2022-06-01 08:29:56 -07:00
PageSetupTest.php Stricter visibility 2020-07-19 12:30:31 +09:00
PropertiesTest.php Document Properties - Coverage and 32-bit-safe Timestamps (#2113) 2021-05-30 13:55:58 +02:00
RibbonTest.php Fix Spreadsheet Copy, Disable Clone, Improve Coverage (#2951) 2022-07-28 07:03:26 -07:00
RichTextTest.php Namespacing Phase 2 - Styles (#2471) 2022-02-11 06:42:04 -08:00
SharedFormulaTest.php Xlsx Reader Better Namespace Handling Phase 1 First Bugfix (#2204) 2021-07-02 12:36:54 +02:00
SheetsXlsxChartTest.php Move Gridlines from Chart to Axis (#2923) 2022-07-07 21:48:12 -07:00
URLImageTest.php Change and Re-enable URLImageTest (#2844) 2022-05-21 08:07:59 -07:00
VerticalAlignTest.php Fix XLSX broken vertical align font style (#2619) 2022-02-23 20:23:59 -08:00
WorksheetInfoNamesTest.php Unit tests for listWorksheetNames() and listWorksheetInfo() with a ChartSheet 2022-05-17 16:11:53 +02:00
Xlsx2Test.php Read conditional styling for cell (#2491) 2022-01-22 19:18:26 +01:00
XlsxRootZipFilesTest.php Fix reading of files in the root of a zip (#2731) 2022-04-18 06:54:41 -07:00
XlsxTest.php Fix Reading XLSX files without styles.xml throws an exception. (#2247) 2021-08-16 05:05:32 -07:00