[BUGFIX] FAL LocalDriverTests throws warnings
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 19:58:52 +0000 (21:58 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 20:08:39 +0000 (22:08 +0200)
commit936348a22785f2602cc8036734a6d75c3784a410
tree641a1af85e4fce32b9e6d2443c30b9505cca3bd8
parent6a384b0b98b93ebc360e9f4e1b26bbb044fe4e90
[BUGFIX] FAL LocalDriverTests throws warnings

finfo() in FAL LocalDriver can not deal with vfs streams and throws
warnings. It is used to fetch the mime type of files.
The patch moves the finfo call to an own method and mocks the methods
in all tests that triggered the warnings.
Additionally, the statReturnsCorrectFileInfo() test is splitted into
four tests and renamed to getLowLevelFileInfoReturnsCorrectFile*. An
additional test is added to test for correct retrieval of mime type
with a prepared dummy file.

Change-Id: Ib3dcd0998dee3d2fa7e0e60eabcf783b712c5fdd
Resolves: #40765
Releases: 6.0
Reviewed-on: http://review.typo3.org/14460
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
tests/Unit/t3lib/file/Driver/Fixtures/Dummy.html [new file with mode: 0644]
tests/Unit/t3lib/file/Driver/LocalDriverTest.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php