Issue Bug Closed

#64929Fix filesize Unittest on windows with CRLF

Stephan Großberndt 02/08/15, 14:20 updated 10/19/17, 21:00

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)

Reviews 1