PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman ae0cd46423
Add exportArray Method for Styles (#1580)
Issue #580 has gone stale since I started work on this.
Nevertheless, this implements an exportArray function as an
exact counterpart of applyFromArry.
I chose the name exportArray to avoid confusion with the existing
method getStyleArray, which does something completely different.

This change also increases coverage for all the Style classes to 100%,
with the exception of Style.php itself. There were several (unchanged)
places in Style.php where I did not have sufficient understanding of
what was supposed to be happening, so could not create tests.

All properties used by applyFromArray are exported by this method.
Note that conditional styles are not covered; this is consistent
with the fact that they are not covered by applyFromArray.

The method is implemented as a final public function in Style/Supervisor,
which calls abstract protected function exportArray1, which is implemented
in each of the subclasses, and which calls final protected
function exportArray2 in Style/Supervisor.
So exportArray is usable for any of the subclasses as well.

The new method is added to the documentation.
The existing documentation for applyFromArray was alphabetized to make
it easier to follow.
One property (Style quotePrefix) was added to the documentation.
Some Borders pseudo-properties (vertical, horizontal, and outline) were
documented as usable by applyFromArray,
but aren't actually supported - they were removed.
The documentation of the properties seemed to use setProperty and
getProperty fairly randomly - it now uses setProperty exclusively.

New constants were added for the textRotation "angles" used to create a
"stacked" cell. I felt that changing the readers and writers to use
these constants was beyond the scope of this change, but it is
on my to-do list.
2020-10-26 20:56:24 +01:00
..
Calculation More unit tests for statistical functions, including a bugfix to LARGE() (#1601) 2020-07-29 23:56:37 +02:00
Cell Restoring State After Static Changes in Tests (#1571) 2020-07-15 13:23:00 +02:00
Chart Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Collection Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Custom Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Functional Codestyle clean-ups 2020-10-09 16:08:20 +02:00
Helper Remove tests that include tcPDF and DomPDF libraries when running against PHP8, because neither library is yet PHP8-ready 2020-10-09 14:31:16 +02:00
Reader Improving Coverage for Excel2003 XML Reader (#1557) 2020-10-11 13:26:56 +02:00
Shared Restoring State After Static Changes in Tests (#1571) 2020-07-15 13:23:00 +02:00
Style Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
Worksheet Stricter visibility 2020-07-19 12:30:31 +09:00
Writer Update composer suggestions 2020-10-11 12:36:47 +02:00
DefinedNameFormulaTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
DefinedNameTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
DocumentGeneratorTest.php Added support for the WEBSERVICE function (#1409) 2020-06-29 10:17:58 +09:00
IOFactoryTest.php Improving Coverage for Excel2003 XML Reader (#1557) 2020-10-11 13:26:56 +02:00
NamedFormulaTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
NamedRangeTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
ReferenceHelperTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
SettingsTest.php fixed php8 deprecation warning for libxml_disable_entity_loader() (#1625) 2020-10-08 15:02:14 +02:00
SpreadsheetTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00