New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Altered cache test to write to tests/tmp instead of tests/cache/tmp. #45
Conversation
Yes, that is indeed an issue. Running the tests needs to be as straight forward as possible. |
…ectory This is the first step of making the test suite use a single directory for writing files to, this directory being tests/tmp. The cache test, instead of tests/cache/tmp, now writes to tests/tmp/cache. Also remove cache directory in setUp method, in case an earlier test run did not complete successfully and the cache directory was not cleaned up. Finally, this change makes the cache test take responsibility over the entire contents of its cache directory. PHPBB3-10013
The problem here is not creating the cache directory, since that can be created because it is assumed that tests/tmp is writable. The problem is that the tests/tmp directory has to be created manually. And mkdir() doesn't create directories recursively by default (and you can't actually create it if the phpBB tree is read-only) |
remove_cache_dir could be refactored into remove_cache_dir_if_exists. Instead of using DirectoryIterator you could use a FilesystemIterator with the FilesystemIterator::CURRENT_AS_PATHNAME and FilesystemIterator::SKIP_DOTS flags. It would be nice if we could keep the tmp directory under version control. |
FilesystemIterator is 5.3+. |
Rebased and merged. |
An alternative implementation that will satisfy Igor's request of tests/tmp being under version control is to add an optional constant to test_config.php that would specify test tmp root. |
No thanks, please not even more configuration. The current implementation works for me. |
Mehrere kleine Korrekturen für 3.1.0-b3
[ticket/security/234] Add URL validation for input fields & main site URL
Patch for develop branch only.