Bug #64929
Fix filesize Unittest on windows with CRLF
Status: | Resolved | Start date: | 2015-02-08 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Unit/Functional Tests | Spent time: | - | |
Target version: | 7.1 (Cleanup) | |||
TYPO3 Version: | 7 | Is Regression: | No | |
PHP Version: | Sprint Focus: | Stabilization Sprint | ||
Complexity: | no-brainer |
Description
If you use autocrlf = true the hardcoded filesize of Dummy.html in TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest::getSpecificFileInformationDataProvider of 48 bytes does not match the actual filesize of 53 bytes.
This leads to a unit test failure:
1) TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest::getSpecificFileInformationReturnsRequestedFileInformation with data set "size" (48, 'size') Failed asserting that 53 is identical to 48. D:\typo3\master\typo3\sysext\core\Tests\Unit\Resource\Driver\LocalDriverTest.php:350 D:\typo3\master\Packages\Libraries\phpunit\phpunit\phpunit:36
Instead of using a hardcoded filesize it should be read from the filesystem. (See https://review.typo3.org/#/c/31256/14)
Related issues
Associated revisions
[BUGFIX] Fix unittest broken due to CRLF
Instead of providing a hardcoded filesize for Dummy.html of 48 bytes in
the DataProvider read the actual filesize from the filesystem. This
fixes a unit test failure on windows when using autocrlf = true in git.
Resolves: #64929
Releases: master
Change-Id: I5227f225cce1fd9dc107859825e19d64907fd110
Reviewed-on: http://review.typo3.org/36743
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
History
#1 Updated by Gerrit Code Review 6 months ago
- Status changed from In Progress to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36743
#2 Updated by Stephan Großberndt 6 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f1ceb275037dbd06567eeec2c3d07512b923c9c1.