[BUGFIX] Failing tests in Resource\Driver\LocalDriverTest on Windows 95/22895/2
authorNicole Cordes <typo3@cordes.co>
Tue, 6 Aug 2013 20:22:06 +0000 (22:22 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 7 Aug 2013 03:35:19 +0000 (05:35 +0200)
commitbc330c1fc350f5c55890698d955bba14e842a2b4
tree5f37ab1e0590538e9284f9ac5a17860e5fae4d89
parenta079ad679f1726e9d8eff5723d0b590b4b3cee87
[BUGFIX] Failing tests in Resource\Driver\LocalDriverTest on Windows

The test createdFilesAreEmpty depends on another test which returns a
mocked object. In the mock two returnValues for getIdentifier() and
getName() were set. But due to PHPUnit architecture mocked functions
belong to the test there were defined and cannot be shared. This is why
the mock has to be initialized within the test itself. The test only
works because on unix system you can open a folder which returns an
empty string.

Furthermore if you use any php function to get a folder path we have to
fix the containing backslashes.

Finally due to some errors we have to rewind any iterator of class
RecursiveIteratorIterator as otherwise a wrong index is returned.

Resolves: #50844
Releases: 6.2, 6.1, 6.0
Change-Id: I13f9efbd1618056fcd66220e3de5e12af79e4dc6
Reviewed-on: https://review.typo3.org/22895
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php