F3_FLOW3_Cache_Backend_FileTest shows 2 errors on WAMP installation
|Priority:||Could have||Due date:|
|Assignee:||Bastian Waidelich||% Done:||
|Target version:||-||Estimated time:||0.00 hour|
|Has patch:||FLOW3 version affected:|
I checked out the distribution from SVN as shown in the podcast. The default view is showing fine. When running the unit tests for the FLOW3 package, I get the following two errors:
F3_FLOW3_Cache_Backend_FileTest Failure in setCacheDirectoryThrowsExceptionOnNonWritableDirectory Detail D:\Entwicklung\Projekte\PHP\FLOW3\Packages\FLOW3\Tests\Cache\Backend\F3_FLOW3_Cache_Backend_FileTest.php:81 setCacheDirectory() to non-writable directory did not result in an exception. Failure in getCacheDirectoryReturnsThePreviouslySetDirectory Detail D:\Entwicklung\Projekte\PHP\FLOW3\Packages\PHPUnit\Resources\PHP\PHPUnit\Framework\Assert.php:1524 getDirectory() did not return the expected value. Failed asserting that <string:C:\WINDOWS\temp\/> is equal to <string:C:\WINDOWS\temp\>. getDirectory() did not return the expected value. Tests: 17 total, 0 skipped, 0 incomplete, 2 failed, 0 errors
I have attached the phpinfo() so you can have a look at my installation (basically Windows XP with Apache 2.2.6 and PHP 5.2.4)
|duplicated by TYPO3.Flow - Bug #917: F3_FLOW3_Package_ManagerTest shows 2 errors on WAMP insta...||Closed||2008-06-30|
- FLOW3: (Cache) It's not always possible to check whether a file or directory is writable or not on Windows. Solution for now: Skip setCacheDirectoryThrowsExceptionOnNonWritableDirectory() in Windows environments. Fixes #918.
- FLOW3: (Utility) getPathToTemporaryDirectoryReturnsPathWithTrailingSlash() checked whether temp-directory ends with a trailing slash as in DIRECTORY_SEPARATOR. Replaced this constant by a forward slash in the test now, as we're only working with forward slashes in FLOW3. Fixes #1134.
Updated by Bastian Waidelich almost 5 years ago
- Status changed from Accepted to Needs Feedback
setCacheDirectoryThrowsExceptionOnNonWritableDirectory will fail on Windows Vista because, on Vista Apache has to be executed with elevated rights. This means PHP is allowed to write to C:/Windows. Even without Admin rights, Vista creates virtual folders called "compatibility files". See http://windowsconnected.com/blogs/jerry/archive/2005/12/19/86.aspx.
Marking the test skipped on Windows machines is the only possibility I can think of at the moment..
getCacheDirectoryReturnsThePreviouslySetDirectory should not fail anymore since r1053