* develop-olympus:
[ticket/9592] Slight adjustments to simplify db test cases
[ticket/9592] Remove test cases for empty IN()
[ticket/9592] Test suite does not run on SQlite
* develop-olympus: (57 commits)
Revert "[ticket/7716] Data too long for column 'message_subject'"
[ticket/7716] Data too long for column 'message_subject'
[ticket/9780] Adding unit tests for gen_rand_string().
[ticket/9780] Add length check back to gen_rand_string().
[ticket/7972] Copying topics in the MCP now indexes the new topic.
[ticket/9782] Board disable radio set on when server load high
[ticket/9635] Useless parameter $data['post_time'] in function submit_post.
[ticket/9104] Safari does not display box headers correctly in the ACP.
[ticket/9777] Print error message in pre-commit hook when php is not installed.
[ticket/7716] Data too long for column 'message_subject'
[task/git-tools] Ignore git commit message comments
[task/git-tools] Adjust the hook to enforce that a ticket is always mentioned
[task/git-tools] Vastly expanded commit-msg hook.
[task/git-tools] Beginnings of a syntax checking hook.
[task/git-tools] Append ticket identifier to commit message prior to editing.
[ticket/7332] Redirect users back to post details when performing actions.
[ticket/7332] Collapse post details content down to a maximum of 300px heigh
[ticket/9771] Remove query string parameters that have no name.
[ticket/9760] Remove unrestricted wildcards from search terms.
[ticket/9599] Reimplement phpbb_checkdnsrr() function.
...
Conflicts:
tests/template/template.php
The template tests disable NOTICEs for the duration of template execution since
the current version of the template engine does not generate sufficiently clean
code. The error level is reset aftwards, however that part is skipped when
trigger_error is called which is converted into a regular exception by PHPUnit
and passed down until caught. Such exceptions are now caught to reset the error
level, and then the exception is rethrown.
This uncovered another issue in the template tests which only passed because
NOTICEs were unintentionally disabled at this point. assign_display is also
required to operate without NOTICEs. The respective code has been added around
its callee as well. However no handling of exceptions takes place there. If
another test checking for errors in that function is ever added similar catch
logic will have to be added there.
PHPBB3-9701
* develop-olympus:
[ticket/9704] Fix minor typo in coding guidelines.
[ticket/9690] Add forthcoming Bing Bot to list of recognized bots
[ticket/9451] Add optional $can_upload parameter to avatar_process_user().
[ticket/9593] A readme file for unit tests and running unit tests.
[ticket/9570] Changed "system" to "guest" timezone in ACP, added explanation.
[ticket/9589] Added sample nginx configuration file for phpbb.
phpBB class name lookups follow these rules:
- All classes are prefixed with phpbb_
- All classes reside in includes/ or a subdirectory thereof
- Directories must not contain underscores
- The class name is separated into parts by underscores, the parts
are checked from first to last, until one is found which is not
a directory, all remaining parts make up the file name. If no parts
are left, the last directory name is used.
Examples:
directory structure:
includes/
class_name.php
dir/
class_name.php
dir.php
subdir/
class_name.php
lookups:
phpbb_class_name -> includes/class_name.php
phpbb_dir_class_name -> includes/dir/class_name.php
phpbb_dir -> includes/dir/dir.php
phpbb_dir_subdir_class_name -> includes/dir/subdir/class_name.php
Optionally the class can be supplied with a cache instance, either in the
constructor or via set_cache() at a later time. This allows for the lookups to
be cached, so the directories do not have to be traveresed on every request.
This makes it necessary for the cache and its dependency to continue to be
loaded the old way - without autoloading.
The code will not be changed to use autoloading, but it will rather only be
used for new classes where applicable.
PHPBB3-9682
* develop-olympus:
[ticket/9626] Adding tests for the URL regular expression.
[ticket/9626] Add missing class prefix.
[ticket/9626] A few tests for the email regular expression.
[ticket/9626] More IPv6 regex tests.
[ticket/9626] Adding tests for the IPv4 regular expression.
[ticket/9626] Adding tests for regular expressions.
* ticket/bantu/9626:
[ticket/9626] Adding tests for the URL regular expression.
[ticket/9626] Add missing class prefix.
[ticket/9626] A few tests for the email regular expression.
[ticket/9626] More IPv6 regex tests.
[ticket/9626] Adding tests for the IPv4 regular expression.
[ticket/9626] Adding tests for regular expressions.
* develop-olympus:
[feature/dbal-tests] Follow the coding guidelines and ...
[feature/dbal-tests] Update data
[feature/dbal-tests] Multi insert
[feature/dbal-tests] Delete data
[feature/dbal-tests] Insert data
[feature/dbal-tests] Fix SQL-ERROR: invalid input syntax for integer: ""
[ticket/9587] Prosilver overrides reCaptcha class.
[ticket/9605] Wrong class added to topiclist, when there's no announcement topic.
* develop-olympus: (26 commits)
[git-tools] add note about PHP_BIN using env
[git-tools] do not display stderr
[git-tools] Prepend the branch to the commit message for all branches.
[git-tools] Use env to find the correct paths to binaries.
[git-tools] Display what parse errors were found.
[git-tools] This script requires bash to run, so point directly to bash.
[feature/dbal-tests] Remove hardcoded 'mysql' from PDO DSN in DBAL test.
[feature/dbal-tests] Fix mysql (not mysqli) dbal test.
[feature/dbal-tests] Only output the missing config error message once.
[feature/dbal-tests] Make the PDO prefix depend on the dbms.
[feature/dbal-tests] Fix whitespace and line endings.
[bug/9108] Fix table binding issues with PostgreSQL in board-wide feed. (Old Bug #58425)
[bug/59425] Correctly check for double inclusion in captcha garbage collection
[bug/58465] The redirect hidden field is now XHTML conform
[feature/dbal-tests] Make some tests for build_array_data on SELECT
[feature/dbal-tests] Make some tests for return_on_error on SELECT-queries
[feature/dbal-tests] Tests for $db->sql_query_limit()
[feature/dbal-tests] Load phpbb-schema after creating the connection to the database
[feature/dbal-tests] Added tests for dbal fetchrow and fetchfield.
[feature/dbal-tests] Added database test & refactored test framework
...
The database base test will need a few more changes to run on all the
databases we support. But those really need to be made on a system where
they run and can be tested. Patches welcome!
* develop-olympus:
[develop-olympus] Make this test run on windows with backslash-paths.
[bug/56965] Redirect fails with directory traversal
[bug/58685] Correct spelling errors in append_sid() comments.
[bug/58025] Search robots are now redirected if they send a SID in the request
There is now a phpbb_database_test_case which can be used as a base class for tests that require database access. You have to set up a test_config.php file in your tests/ directory containing host, user, pass etc.
Extra test functionality has been moved to phpbb_test_case_helpers to provide the same functionality in database tests and regular tests without duplicating the code. This is achieved through delegation of method calls.