PhpSpreadsheet/tests/PhpSpreadsheetTests/Helper
oleibman 7e071e8abc
Coverage for Helper/Samples (#1920)
* Coverage for Helper/Samples

I was perplexed by the fact that Helper/Samples seemed to be entirely uncovered when running the test suite, since I know all the samples are run as part of the test. I think that what must be happening is that the Helper code is invoked mostly as part of a Data Provider (and therefore not counted), not as part of the test proper (which would count). So, this change adds a small number of tests which result in Samples being 100% covered.

Covering one statement was tricky - simulating the inability to create a test directory. Mocking, a technique I have not used before, solves this problem admirably.

* Suggestions From Mark Baker

Tests changed from assertEquals to assertSame.

Added @covers annotation to test class.

Validate parameter for method being mocked.
2021-03-14 20:04:07 +01:00
..
HtmlTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SampleCoverageTest.php Coverage for Helper/Samples (#1920) 2021-03-14 20:04:07 +01:00
SampleTest.php Initial experiments using the new Database query logic with Conditional Statistical Functions (#1880) 2021-02-27 18:26:12 +01:00