PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman 9428552d94
Add editAs Property for 2-cell Anchor Drawings (#2674)
* Add editAs Property for 2-cell Anchor Drawings

This change builds on PR #2532 (@naotake51 as PR #2532), using ideas from PR #2237 (@AdamGaskins), which has had changes requested for several months. It covers a lot of the same ground as 2532. In Excel, two-cell anchor drawings can be edited as "twocell", "onecell", or "absolute". This PR adds support for those options, with a sample file that demonstrates the difference in addition to unit tests. Several other tests are added to improve the spotty coverage for Drawings.

There have been several other tickets referencing two cell anchors, including issue #1159 and PR #1160 (@sgarwood, who also added support for editAs), PR #643, and issue #126, all now closed but not necessarily entirely resolved. I will try to ensure that those tickets are addressed with this one.

And, in trying to make sure 1160 is covered, I stumbled upon a bug. If you use the same image resource to create two+ memory drawings, the MemoryDrawing destructor for the first will cause the rest to generate a very long warning message. This is not a problem for Php8+, only for Php7-. I have suppressed the message in the MemoryDrawing constructor. 1160 went stale due to an unresolved test error, but I don't think this was the problem. At any rate, its test works now.

* Scrutinizer

It reported 1 minor issue (fixed normally), and 2 major. One is fixed with a kludge. The other is a case where Scrutinizer's analysis is just wrong, and I can't figure out a kludge. But I was able to add an annotation (the first time I've managed to get one past phpcs/php-cs-fixer). We'll see.
2022-03-16 16:12:38 -07:00
..
Calculation Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Cell Refactor ISO data type validation from cell to shared date; add extra checks for invalid dates; and appropriate unit tests 2022-02-26 14:13:12 +01:00
Chart DocBlock Changes for Chart/Title 2021-07-02 14:33:43 -07:00
Collection Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Custom Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Document Correct Some Problems Which Will Show Up for PHP8.1 (#2191) 2021-06-29 19:54:08 +02:00
Features/AutoFilter/Xlsx Issue 2216 resolve office365 auto filter structure move (#2218) 2021-07-12 03:19:40 +02:00
Functional Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Helper Set precision for Database function unit tests, for RowColumnReference and Dimension Helper unit tests (#2604) 2022-02-18 21:37:26 +01:00
Reader Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Shared Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Style Handle Booleans in Conditional Styles (#2654) 2022-03-09 18:30:57 -08:00
Worksheet Add editAs Property for 2-cell Anchor Drawings (#2674) 2022-03-16 16:12:38 -07:00
Writer Add editAs Property for 2-cell Anchor Drawings (#2674) 2022-03-16 16:12:38 -07:00
CellReferenceHelperTest.php Provide $includeAbsoluteReferences option for the CellReferenceHelper when updating cell addresses 2022-03-16 19:14:50 +01:00
CommentTest.php Namespacing Phase 2 - Styles (#2471) 2022-02-11 06:42:04 -08:00
DefinedNameFormulaTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNameTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DocumentGeneratorTest.php Move documentation builder to infra so that it isn't included in non `--dev` composer downloads 2021-05-28 22:35:37 +02:00
HashTableTest.php Improve Coverage for HashTable, Fix Clone 2021-05-30 13:03:37 +02:00
IOFactoryTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
LocaleGeneratorTest.php Fix phpcs, phpstan and scrutinizer issues 2021-05-28 22:35:37 +02:00
NamedFormulaTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
NamedRange2Test.php Validate Input to SetSelectedCells (#2280) 2021-09-11 06:55:00 -07:00
NamedRangeTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
ReferenceHelperTest.php Some additional unit tests for the ReferenceHelper 2022-03-16 16:38:08 +01:00
SettingsTest.php Fix SettingsTest 2021-06-30 11:33:35 -07:00
SpreadsheetTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00