aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/RUNNING_TESTS.md14
-rw-r--r--tests/acp_board/auth_provider/invalid.php10
-rw-r--r--tests/acp_board/auth_provider/valid.php10
-rw-r--r--tests/acp_board/select_auth_method_test.php14
-rw-r--r--tests/auth/provider_apache_test.php10
-rw-r--r--tests/auth/provider_db_test.php10
-rw-r--r--tests/auth/provider_oauth_token_storage_test.php10
-rw-r--r--tests/avatar/manager_test.php10
-rw-r--r--tests/bbcode/parser_test.php10
-rw-r--r--tests/bbcode/url_bbcode_test.php10
-rw-r--r--tests/bootstrap.php10
-rw-r--r--tests/cache/apc_driver_test.php10
-rw-r--r--tests/cache/common_test_case.php10
-rw-r--r--tests/cache/file_driver_test.php10
-rw-r--r--tests/cache/null_driver_test.php10
-rw-r--r--tests/cache/redis_driver_test.php10
-rw-r--r--tests/class_loader/class_loader_test.php10
-rw-r--r--tests/compress/compress_test.php16
-rw-r--r--tests/config/config_test.php10
-rw-r--r--tests/config/db_test.php10
-rw-r--r--tests/config/db_text_test.php22
-rw-r--r--tests/console/cron/cron_list_test.php103
-rw-r--r--tests/console/cron/fixtures/config.xml8
-rw-r--r--tests/console/cron/run_test.php157
-rw-r--r--tests/console/cron/tasks/simple.php27
-rw-r--r--tests/console/cron/tasks/simple_not_ready.php13
-rw-r--r--tests/console/cron/tasks/simple_ready.php8
-rw-r--r--tests/content_visibility/delete_post_test.php10
-rw-r--r--tests/content_visibility/fixtures/set_post_visibility.xml84
-rw-r--r--tests/content_visibility/get_forums_visibility_sql_test.php10
-rw-r--r--tests/content_visibility/get_global_visibility_sql_test.php10
-rw-r--r--tests/content_visibility/get_visibility_sql_test.php10
-rw-r--r--tests/content_visibility/set_post_visibility_test.php51
-rw-r--r--tests/content_visibility/set_topic_visibility_test.php10
-rw-r--r--tests/controller/controller_test.php12
-rw-r--r--tests/controller/helper_route_test.php10
-rw-r--r--tests/cron/ext/testext/cron/dummy_task.php10
-rw-r--r--tests/cron/includes/cron/task/core/dummy_task.php10
-rw-r--r--tests/cron/includes/cron/task/core/second_dummy_task.php10
-rw-r--r--tests/cron/manager_test.php10
-rw-r--r--tests/datetime/from_format_test.php10
-rw-r--r--tests/dbal/auto_increment_test.php10
-rw-r--r--tests/dbal/case_test.php10
-rw-r--r--tests/dbal/concatenate_test.php10
-rw-r--r--tests/dbal/connect_test.php10
-rw-r--r--tests/dbal/cross_join_test.php10
-rw-r--r--tests/dbal/db_tools_test.php10
-rw-r--r--tests/dbal/fixtures/styles.xml6
-rw-r--r--tests/dbal/migration/dummy.php10
-rw-r--r--tests/dbal/migration/dummy_order.php30
-rw-r--r--tests/dbal/migration/dummy_order_0.php26
-rw-r--r--tests/dbal/migration/dummy_order_1.php26
-rw-r--r--tests/dbal/migration/dummy_order_2.php26
-rw-r--r--tests/dbal/migration/dummy_order_3.php26
-rw-r--r--tests/dbal/migration/dummy_order_4.php26
-rw-r--r--tests/dbal/migration/dummy_order_5.php27
-rw-r--r--tests/dbal/migration/fail.php10
-rw-r--r--tests/dbal/migration/if.php10
-rw-r--r--tests/dbal/migration/installed.php10
-rw-r--r--tests/dbal/migration/recall.php10
-rw-r--r--tests/dbal/migration/revert.php10
-rw-r--r--tests/dbal/migration/revert_with_dependency.php10
-rw-r--r--tests/dbal/migration/schema.php10
-rw-r--r--tests/dbal/migration/unfulfillable.php10
-rw-r--r--tests/dbal/migrator_test.php12
-rw-r--r--tests/dbal/migrator_tool_config_test.php10
-rw-r--r--tests/dbal/migrator_tool_module_test.php10
-rw-r--r--tests/dbal/migrator_tool_permission_test.php10
-rw-r--r--tests/dbal/order_lower_test.php16
-rw-r--r--tests/dbal/schema_test.php10
-rw-r--r--tests/dbal/select_test.php10
-rw-r--r--tests/dbal/sql_affected_rows_test.php68
-rw-r--r--tests/dbal/sql_insert_buffer_test.php10
-rw-r--r--tests/dbal/write_sequence_test.php10
-rw-r--r--tests/dbal/write_test.php10
-rw-r--r--tests/di/create_container_test.php10
-rw-r--r--tests/download/http_byte_range_test.php10
-rw-r--r--tests/download/http_user_agent_test.php10
-rw-r--r--tests/error_collector_test.php10
-rw-r--r--tests/event/dispatcher_test.php10
-rw-r--r--tests/event/export_php_test.php10
-rw-r--r--tests/event/md_exporter_test.php10
-rw-r--r--tests/event/php_exporter_test.php10
-rw-r--r--tests/extension/finder_test.php26
-rw-r--r--tests/extension/includes/acp/acp_foobar.php13
-rw-r--r--tests/extension/includes/acp/info/acp_foobar.php13
-rw-r--r--tests/extension/manager_test.php12
-rw-r--r--tests/extension/metadata_manager_test.php34
-rw-r--r--tests/extension/modules_test.php10
-rw-r--r--tests/filesystem/clean_path_test.php10
-rw-r--r--tests/functional/acp_groups_test.php10
-rw-r--r--tests/functional/acp_permissions_test.php10
-rw-r--r--tests/functional/acp_users_test.php10
-rw-r--r--tests/functional/auth_test.php10
-rw-r--r--tests/functional/avatar_acp_groups_test.php16
-rw-r--r--tests/functional/avatar_acp_users_test.php16
-rw-r--r--tests/functional/avatar_ucp_groups_test.php17
-rw-r--r--tests/functional/avatar_ucp_users_test.php16
-rw-r--r--tests/functional/browse_test.php10
-rw-r--r--tests/functional/common_avatar_test.php16
-rw-r--r--tests/functional/common_groups_test.php10
-rw-r--r--tests/functional/download_test.php10
-rw-r--r--tests/functional/extension_acp_test.php16
-rw-r--r--tests/functional/extension_controller_test.php10
-rw-r--r--tests/functional/extension_global_lang_test.php10
-rw-r--r--tests/functional/extension_module_test.php10
-rw-r--r--tests/functional/extension_permission_lang_test.php10
-rw-r--r--tests/functional/feed_test.php10
-rw-r--r--tests/functional/fileupload_form_test.php16
-rw-r--r--tests/functional/fileupload_remote_test.php16
-rw-r--r--tests/functional/fixtures/ext/foo/bar/acp/main_info.php11
-rw-r--r--tests/functional/fixtures/ext/foo/bar/acp/main_module.php11
-rw-r--r--tests/functional/fixtures/ext/foo/bar/event/permission.php11
-rw-r--r--tests/functional/fixtures/ext/foo/bar/event/user_setup.php11
-rw-r--r--tests/functional/fixtures/ext/foo/bar/ucp/main_info.php11
-rw-r--r--tests/functional/fixtures/ext/foo/bar/ucp/main_module.php11
-rw-r--r--tests/functional/forgot_password_test.php10
-rw-r--r--tests/functional/forum_password_test.php10
-rw-r--r--tests/functional/forum_style_test.php10
-rw-r--r--tests/functional/group_create_test.php10
-rw-r--r--tests/functional/jumpbox_test.php10
-rw-r--r--tests/functional/lang_test.php10
-rw-r--r--tests/functional/mcp_test.php10
-rw-r--r--tests/functional/memberlist_test.php10
-rw-r--r--tests/functional/metadata_manager_test.php12
-rw-r--r--tests/functional/notification_test.php10
-rw-r--r--tests/functional/paging_test.php10
-rw-r--r--tests/functional/plupload_test.php16
-rw-r--r--tests/functional/posting_test.php10
-rw-r--r--tests/functional/prune_shadow_topic_test.php10
-rw-r--r--tests/functional/registration_test.php10
-rw-r--r--tests/functional/report_post_captcha_test.php16
-rw-r--r--tests/functional/search/base.php10
-rw-r--r--tests/functional/search/mysql_test.php10
-rw-r--r--tests/functional/search/native_test.php10
-rw-r--r--tests/functional/search/postgres_test.php10
-rw-r--r--tests/functional/search/sphinx_test.php10
-rw-r--r--tests/functional/ucp_allow_pm_test.php10
-rw-r--r--tests/functional/ucp_groups_test.php10
-rw-r--r--tests/functional/ucp_pm_test.php10
-rw-r--r--tests/functional/ucp_profile_test.php10
-rw-r--r--tests/functional/user_password_reset_test.php10
-rw-r--r--tests/functional/visibility_disapprove_test.php10
-rw-r--r--tests/functional/visibility_reapprove_test.php13
-rw-r--r--tests/functional/visibility_softdelete_test.php10
-rw-r--r--tests/functions/build_hidden_fields_for_query_params_test.php10
-rw-r--r--tests/functions/build_url_test.php10
-rw-r--r--tests/functions/convert_30_dbms_to_31_test.php10
-rw-r--r--tests/functions/generate_string_list.php10
-rw-r--r--tests/functions/get_formatted_filesize_test.php10
-rw-r--r--tests/functions/get_remote_file_test.php10
-rw-r--r--tests/functions/is_absolute_test.php10
-rw-r--r--tests/functions/language_select_test.php10
-rw-r--r--tests/functions/obtain_online_test.php10
-rw-r--r--tests/functions/parse_cfg_file_test.php27
-rw-r--r--tests/functions/phpbb_get_banned_user_ids.php10
-rw-r--r--tests/functions/quoteattr_test.php10
-rw-r--r--tests/functions/style_select_test.php10
-rw-r--r--tests/functions/validate_data_helper.php10
-rw-r--r--tests/functions/validate_date_test.php10
-rw-r--r--tests/functions/validate_email_test.php72
-rw-r--r--tests/functions/validate_hex_colour_test.php10
-rw-r--r--tests/functions/validate_jabber_test.php10
-rw-r--r--tests/functions/validate_lang_iso_test.php10
-rw-r--r--tests/functions/validate_match_test.php10
-rw-r--r--tests/functions/validate_num_test.php10
-rw-r--r--tests/functions/validate_password_test.php10
-rw-r--r--tests/functions/validate_string_test.php10
-rw-r--r--tests/functions/validate_user_email_test.php106
-rw-r--r--tests/functions/validate_username_test.php10
-rw-r--r--tests/functions/validate_with_method_test.php10
-rw-r--r--tests/functions_acp/build_cfg_template_test.php10
-rw-r--r--tests/functions_acp/build_select_test.php10
-rw-r--r--tests/functions_acp/h_radio_test.php10
-rw-r--r--tests/functions_acp/validate_config_vars_test.php10
-rw-r--r--tests/functions_acp/validate_range_test.php10
-rw-r--r--tests/functions_content/get_username_string_test.php10
-rw-r--r--tests/functions_content/phpbb_clean_search_string_test.php10
-rw-r--r--tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php10
-rw-r--r--tests/functions_database_helper/update_rows_avoiding_duplicates_test.php10
-rw-r--r--tests/functions_install/ignore_new_file_on_update_test.php10
-rw-r--r--tests/functions_user/group_user_attributes_test.php10
-rw-r--r--tests/groupposition/legend_test.php10
-rw-r--r--tests/groupposition/teampage_test.php10
-rw-r--r--tests/lint_test.php10
-rw-r--r--tests/lock/db_test.php10
-rw-r--r--tests/lock/flock_test.php10
-rw-r--r--tests/log/add_test.php10
-rw-r--r--tests/log/delete_test.php157
-rw-r--r--tests/log/fixtures/delete_log.xml232
-rw-r--r--tests/log/function_add_log_test.php10
-rw-r--r--tests/log/function_view_log_test.php10
-rw-r--r--tests/migrator/convert_timezones_test.php10
-rw-r--r--tests/migrator/get_schema_steps_test.php10
-rw-r--r--tests/migrator/schema_generator_test.php97
-rw-r--r--tests/mimetype/guesser_test.php10
-rw-r--r--tests/mimetype/incorrect_guesser.php10
-rw-r--r--tests/mimetype/null_guesser.php10
-rw-r--r--tests/mock/auth_provider.php16
-rw-r--r--tests/mock/cache.php10
-rw-r--r--tests/mock/container_builder.php10
-rw-r--r--tests/mock/controller_helper.php10
-rw-r--r--tests/mock/event_dispatcher.php10
-rw-r--r--tests/mock/extension_manager.php10
-rw-r--r--tests/mock/filespec.php16
-rw-r--r--tests/mock/filesystem_extension_manager.php10
-rw-r--r--tests/mock/fileupload.php16
-rw-r--r--tests/mock/lang.php10
-rw-r--r--tests/mock/metadata_manager.php10
-rw-r--r--tests/mock/notification_manager.php11
-rw-r--r--tests/mock/notification_type_post.php10
-rw-r--r--tests/mock/notifications_auth.php10
-rw-r--r--tests/mock/null_cache.php10
-rw-r--r--tests/mock/request.php10
-rw-r--r--tests/mock/search.php10
-rw-r--r--tests/mock/session_testable.php10
-rw-r--r--tests/mock/sql_insert_buffer.php10
-rw-r--r--tests/mock/user.php10
-rw-r--r--tests/network/checkdnsrr_test.php10
-rw-r--r--tests/network/ftp_fsock_pasv_epsv_test.php10
-rw-r--r--tests/network/inet_ntop_pton_test.php10
-rw-r--r--tests/network/ip_normalise_test.php10
-rw-r--r--tests/notification/base.php10
-rw-r--r--tests/notification/convert_test.php10
-rw-r--r--tests/notification/ext/test/notification/type/test.php10
-rw-r--r--tests/notification/group_request_test.php10
-rw-r--r--tests/notification/manager_helper.php11
-rw-r--r--tests/notification/notification_test.php10
-rw-r--r--tests/notification/submit_post_base.php10
-rw-r--r--tests/notification/submit_post_type_bookmark_test.php10
-rw-r--r--tests/notification/submit_post_type_post_in_queue_test.php10
-rw-r--r--tests/notification/submit_post_type_post_test.php10
-rw-r--r--tests/notification/submit_post_type_quote_test.php10
-rw-r--r--tests/notification/submit_post_type_topic_test.php10
-rw-r--r--tests/notification/user_list_trim_test.php10
-rw-r--r--tests/pagination/pagination_test.php10
-rw-r--r--tests/passwords/drivers_test.php10
-rw-r--r--tests/passwords/manager_test.php10
-rw-r--r--tests/path_helper/path_helper_test.php10
-rw-r--r--tests/privmsgs/delete_user_pms_test.php10
-rw-r--r--tests/profile/custom_string_test.php10
-rw-r--r--tests/profile/custom_test.php10
-rw-r--r--tests/profile/get_profile_value_test.php10
-rw-r--r--tests/random/gen_rand_string_test.php10
-rw-r--r--tests/regex/censor_test.php10
-rw-r--r--tests/regex/email_test.php10
-rw-r--r--tests/regex/ipv4_test.php10
-rw-r--r--tests/regex/ipv6_test.php10
-rw-r--r--tests/regex/password_complexity_test.php10
-rw-r--r--tests/regex/table_prefix_test.php10
-rw-r--r--tests/regex/url_test.php10
-rw-r--r--tests/request/deactivated_super_global_test.php11
-rw-r--r--tests/request/request_test.php11
-rw-r--r--tests/request/request_var_test.php10
-rw-r--r--tests/request/type_cast_helper_test.php11
-rw-r--r--tests/search/common_test_case.php10
-rw-r--r--tests/search/mysql_test.php10
-rw-r--r--tests/search/native_test.php10
-rw-r--r--tests/search/postgres_test.php10
-rw-r--r--tests/security/base.php10
-rw-r--r--tests/security/extract_current_page_test.php10
-rw-r--r--tests/security/hash_test.php10
-rw-r--r--tests/security/redirect_test.php10
-rw-r--r--tests/session/append_sid_test.php10
-rw-r--r--tests/session/check_ban_test.php16
-rw-r--r--tests/session/check_isvalid_test.php10
-rw-r--r--tests/session/create_test.php16
-rw-r--r--tests/session/extract_hostname_test.php16
-rw-r--r--tests/session/extract_page_test.php16
-rw-r--r--tests/session/garbage_collection_test.php16
-rw-r--r--tests/session/session_key_test.php16
-rw-r--r--tests/session/testable_facade.php16
-rw-r--r--tests/session/testable_factory.php10
-rw-r--r--tests/session/unset_admin_test.php16
-rw-r--r--tests/session/validate_referrer_test.php16
-rw-r--r--tests/template/includephp_test.php10
-rw-r--r--tests/template/subdir/includephp_from_subdir_test.php10
-rw-r--r--tests/template/template_events_test.php10
-rw-r--r--tests/template/template_includecss_test.php10
-rw-r--r--tests/template/template_includejs_test.php10
-rw-r--r--tests/template/template_inheritance_test.php10
-rw-r--r--tests/template/template_parser_test.php10
-rw-r--r--tests/template/template_test.php10
-rw-r--r--tests/template/template_test_case.php10
-rw-r--r--tests/template/template_test_case_with_tree.php10
-rw-r--r--tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php10
-rw-r--r--tests/test_framework/phpbb_database_test_case.php10
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php10
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php12
-rw-r--r--tests/test_framework/phpbb_search_test_case.php10
-rw-r--r--tests/test_framework/phpbb_session_test_case.php16
-rw-r--r--tests/test_framework/phpbb_test_case.php10
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php10
-rw-r--r--tests/text_processing/censor_text_test.php10
-rw-r--r--tests/text_processing/generate_text_for_display_test.php10
-rw-r--r--tests/text_processing/make_clickable_test.php10
-rw-r--r--tests/tree/nestedset_forum_base.php10
-rw-r--r--tests/tree/nestedset_forum_get_data_test.php10
-rw-r--r--tests/tree/nestedset_forum_insert_delete_test.php10
-rw-r--r--tests/tree/nestedset_forum_move_test.php10
-rw-r--r--tests/tree/nestedset_forum_regenerate_test.php10
-rw-r--r--tests/tree/nestedset_forum_test.php10
-rw-r--r--tests/upload/filespec_test.php16
-rw-r--r--tests/upload/fileupload_test.php41
-rw-r--r--tests/user/lang_test.php10
-rw-r--r--tests/user/user_loader_test.php10
-rw-r--r--tests/utf/normalizer_test.php10
-rw-r--r--tests/utf/utf8_clean_string_test.php10
-rw-r--r--tests/utf/utf8_wordwrap_test.php10
-rw-r--r--tests/version/version_fetch_test.php10
-rw-r--r--tests/version/version_test.php20
-rw-r--r--tests/wrapper/gmgetdate_test.php10
-rw-r--r--tests/wrapper/mt_rand_test.php10
-rw-r--r--tests/wrapper/phpbb_php_ini_fake.php10
-rw-r--r--tests/wrapper/phpbb_php_ini_test.php10
-rw-r--r--tests/wrapper/version_compare_test.php10
316 files changed, 3563 insertions, 1058 deletions
diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md
index 0778046141..d638c86859 100644
--- a/tests/RUNNING_TESTS.md
+++ b/tests/RUNNING_TESTS.md
@@ -128,12 +128,16 @@ Slow tests
--------------
Certain tests, such as the UTF-8 normalizer or the DNS tests tend to be slow.
-Thus these tests are in the `slow` group, which is excluded by default. You can
-enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you
+Thus these tests are in the `slow` group, which is excluded by default. If you
only want the slow tests, run:
$ phpBB/vendor/bin/phpunit --group slow
+If you want all tests, run:
+
+ $ phpBB/vendor/bin/phpunit --group __nogroup__,functional,slow
+
+
Functional tests
-----------------
@@ -154,10 +158,10 @@ on which to run tests.
$phpbb_functional_url = 'http://localhost/phpBB3/';
-To then run the tests, you run PHPUnit, but use the phpunit.xml.functional
-config file instead of the default one. Specify this through the "-c" option:
+Functional tests are automatically run, if '$phpbb_functional_url' is configured.
+If you only want the functional tests, run:
- $ phpBB/vendor/bin/phpunit -c phpunit.xml.functional
+ $ phpBB/vendor/bin/phpunit --group functional
This will change your board's config.php file, but it makes a backup at
config_dev.php, so you can restore it after the test run is complete.
diff --git a/tests/acp_board/auth_provider/invalid.php b/tests/acp_board/auth_provider/invalid.php
index acce3b7e2d..dbd1d159a4 100644
--- a/tests/acp_board/auth_provider/invalid.php
+++ b/tests/acp_board/auth_provider/invalid.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/acp_board/auth_provider/valid.php b/tests/acp_board/auth_provider/valid.php
index 13ec1e3250..6477bf4b53 100644
--- a/tests/acp_board/auth_provider/valid.php
+++ b/tests/acp_board/auth_provider/valid.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php
index b943554564..16e5954c64 100644
--- a/tests/acp_board/select_auth_method_test.php
+++ b/tests/acp_board/select_auth_method_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -18,8 +22,8 @@ class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
public static function select_auth_method_data()
{
return array(
- array('acp_board_valid', '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'),
- array('acp_board_invalid', '<option value="acp_board_valid">Acp_board_valid</option>'),
+ array('acp_board_valid', '<option value="acp_board_valid" selected="selected" data-toggle-setting="#auth_acp_board_valid_settings">Acp_board_valid</option>'),
+ array('acp_board_invalid', '<option value="acp_board_valid" data-toggle-setting="#auth_acp_board_valid_settings">Acp_board_valid</option>'),
);
}
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
index 4b12abd62a..e17040902f 100644
--- a/tests/auth/provider_apache_test.php
+++ b/tests/auth/provider_apache_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php
index 91ffcdc2a7..f071709a4b 100644
--- a/tests/auth/provider_db_test.php
+++ b/tests/auth/provider_db_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php
index fdc08833a3..ec28e546bd 100644
--- a/tests/auth/provider_oauth_token_storage_test.php
+++ b/tests/auth/provider_oauth_token_storage_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 69d4280b9a..246397ad6c 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/bbcode/parser_test.php b/tests/bbcode/parser_test.php
index 4bf5037f45..14736627f3 100644
--- a/tests/bbcode/parser_test.php
+++ b/tests/bbcode/parser_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/bbcode/url_bbcode_test.php b/tests/bbcode/url_bbcode_test.php
index d5df386714..83176abe4c 100644
--- a/tests/bbcode/url_bbcode_test.php
+++ b/tests/bbcode/url_bbcode_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index afb586435c..bb4a703cc3 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cache/apc_driver_test.php b/tests/cache/apc_driver_test.php
index 51f3ac24b6..10130b465b 100644
--- a/tests/cache/apc_driver_test.php
+++ b/tests/cache/apc_driver_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cache/common_test_case.php b/tests/cache/common_test_case.php
index 3fe10c63e1..ee0649a755 100644
--- a/tests/cache/common_test_case.php
+++ b/tests/cache/common_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cache/file_driver_test.php b/tests/cache/file_driver_test.php
index c0843e8ed9..471316847d 100644
--- a/tests/cache/file_driver_test.php
+++ b/tests/cache/file_driver_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cache/null_driver_test.php b/tests/cache/null_driver_test.php
index 049d0412b6..b9f96732f5 100644
--- a/tests/cache/null_driver_test.php
+++ b/tests/cache/null_driver_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cache/redis_driver_test.php b/tests/cache/redis_driver_test.php
index 3d954dc0db..387e6ca855 100644
--- a/tests/cache/redis_driver_test.php
+++ b/tests/cache/redis_driver_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php
index d3c7bb0579..ffb14b0720 100644
--- a/tests/class_loader/class_loader_test.php
+++ b/tests/class_loader/class_loader_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/compress/compress_test.php b/tests/compress/compress_test.php
index 6623f7ed8a..56c406b206 100644
--- a/tests/compress/compress_test.php
+++ b/tests/compress/compress_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
diff --git a/tests/config/config_test.php b/tests/config/config_test.php
index 5373fcef5f..380b4336a7 100644
--- a/tests/config/config_test.php
+++ b/tests/config/config_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/config/db_test.php b/tests/config/db_test.php
index dd1c88f707..713e6cb6d9 100644
--- a/tests/config/db_test.php
+++ b/tests/config/db_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/config/db_text_test.php b/tests/config/db_text_test.php
index 354c0efacf..a91abf990f 100644
--- a/tests/config/db_text_test.php
+++ b/tests/config/db_text_test.php
@@ -1,16 +1,20 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
class phpbb_config_db_text_test extends phpbb_database_test_case
{
- private $db;
- private $config_text;
+ /** @var \phpbb\config\db_text */
+ protected $config_text;
public function getDataSet()
{
@@ -48,6 +52,12 @@ class phpbb_config_db_text_test extends phpbb_database_test_case
$this->assertSame('24', $this->config_text->get('foo'));
}
+ public function test_set_same_value_get()
+ {
+ $this->config_text->set('foo', '23');
+ $this->assertSame('23', $this->config_text->get('foo'));
+ }
+
public function test_set_get_long_string()
{
$expected = str_repeat('ABC', 10000);
@@ -89,6 +99,8 @@ class phpbb_config_db_text_test extends phpbb_database_test_case
'baby' => 'phpBB',
// Entry update
'bar' => '64',
+ // Entry update - same value
+ 'foo' => '23',
);
$this->config_text->set_array($set_array_param);
diff --git a/tests/console/cron/cron_list_test.php b/tests/console/cron/cron_list_test.php
new file mode 100644
index 0000000000..46705a585f
--- /dev/null
+++ b/tests/console/cron/cron_list_test.php
@@ -0,0 +1,103 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+require_once dirname(__FILE__) . '/tasks/simple_ready.php';
+require_once dirname(__FILE__) . '/tasks/simple_not_ready.php';
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Tester\CommandTester;
+use phpbb\console\command\cron\cron_list;
+
+class phpbb_console_command_cron_list_test extends phpbb_test_case
+{
+ /** @var \phpbb\cron\manager */
+ protected $cron_manager;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ protected $command_name;
+
+ protected $command_tester;
+
+ protected function setUp()
+ {
+ $this->user = $this->getMock('\phpbb\user');
+ $this->user->method('lang')->will($this->returnArgument(0));
+ }
+
+ public function test_no_task()
+ {
+ $this->initiate_test(0, 0);
+ $this->assertContains('CRON_NO_TASKS', $this->command_tester->getDisplay());
+ }
+
+ public function test_only_ready()
+ {
+ $this->initiate_test(2, 0);
+ $this->assertContains('TASKS_READY command1 command2', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
+ }
+
+ public function test_only_not_ready()
+ {
+ $this->initiate_test(0, 2);
+ $this->assertContains('TASKS_NOT_READY command1 command2', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
+ }
+
+ public function test_both_ready()
+ {
+ $this->initiate_test(2, 2);
+ $this->assertSame('TASKS_READY command1 command2 TASKS_NOT_READY command3 command4', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
+ }
+
+ public function get_cron_manager(array $tasks)
+ {
+ global $pathEx, $phpbb_root_path;
+ $i = 1;
+ foreach ($tasks as $task)
+ {
+ $task->set_name('command' . $i);
+ $i++;
+ }
+ $this->cron_manager = new \phpbb\cron\manager($tasks, $phpbb_root_path, $pathEx);
+ }
+
+ public function get_command_tester()
+ {
+ $application = new Application();
+ $application->add(new cron_list($this->cron_manager, $this->user));
+
+ $command = $application->find('cron:list');
+ $this->command_name = $command->getName();
+ return new CommandTester($command);
+ }
+
+ public function initiate_test($number_ready, $number_not_ready)
+ {
+ $tasks = array();
+
+ for ($i = 0; $i < $number_ready; $i++)
+ {
+ $tasks[] = new phpbb_cron_task_simple_ready();
+ }
+
+ for ($i = 0; $i < $number_not_ready; $i++)
+ {
+ $tasks[] = new phpbb_cron_task_simple_not_ready();
+ }
+
+ $this->get_cron_manager($tasks);
+ $this->command_tester = $this->get_command_tester();
+ $this->command_tester->execute(array('command' => $this->command_name, '--no-ansi' => true));
+ }
+}
diff --git a/tests/console/cron/fixtures/config.xml b/tests/console/cron/fixtures/config.xml
new file mode 100644
index 0000000000..2cb683d409
--- /dev/null
+++ b/tests/console/cron/fixtures/config.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <column>is_dynamic</column>
+ </table>
+</dataset>
diff --git a/tests/console/cron/run_test.php b/tests/console/cron/run_test.php
new file mode 100644
index 0000000000..ff251cff3c
--- /dev/null
+++ b/tests/console/cron/run_test.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Tester\CommandTester;
+use phpbb\console\command\cron\run;
+
+require_once dirname(__FILE__) . '/tasks/simple.php';
+
+class phpbb_console_command_cron_run_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $config;
+ protected $lock;
+ protected $user;
+ protected $cron_manager;
+ protected $command_name;
+ protected $task;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ public function setUp()
+ {
+ global $db, $config, $phpbb_root_path, $phpEx;
+
+ $db = $this->db = $this->new_dbal();
+ $config = $this->config = new \phpbb\config\config(array('cron_lock' => '0'));
+ set_config(null, null, null, $this->config);
+ $this->lock = new \phpbb\lock\db('cron_lock', $this->config, $this->db);
+
+ $this->user = $this->getMock('\phpbb\user');
+ $this->user->method('lang')->will($this->returnArgument(0));
+
+ $this->task = new phpbb_cron_task_simple();
+ $tasks = array(
+ $this->task,
+ );
+ $this->cron_manager = new \phpbb\cron\manager($tasks, $phpbb_root_path, $phbEx);
+
+ $this->assertSame('0', $config['cron_lock']);
+ }
+
+ public function test_normal_use()
+ {
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name));
+
+ $this->assertSame('', $command_tester->getDisplay());
+ $this->assertSame(true, $this->task->executed);
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_verbose_mode()
+ {
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name, '--verbose' => true));
+
+ $this->assertContains('RUNNING_TASK', $command_tester->getDisplay());
+ $this->assertSame(true, $this->task->executed);
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_error_lock()
+ {
+ $this->lock->acquire();
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name));
+
+ $this->assertContains('CRON_LOCK_ERROR', $command_tester->getDisplay());
+ $this->assertSame(false, $this->task->executed);
+ $this->assertSame(1, $exit_status);
+ }
+
+ public function test_no_task()
+ {
+ $tasks = array(
+ );
+ $this->cron_manager = new \phpbb\cron\manager($tasks, $phpbb_root_path, $phpEx);
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name));
+
+ $this->assertSame('', $command_tester->getDisplay());
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_no_task_verbose()
+ {
+ $tasks = array(
+ );
+ $this->cron_manager = new \phpbb\cron\manager($tasks, $phpbb_root_path, $phpEx);
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name, '--verbose' => true));
+
+ $this->assertContains('CRON_NO_TASK', $command_tester->getDisplay());
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_arg_valid()
+ {
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name, 'name' => 'phpbb_cron_task_simple'));
+
+ $this->assertSame('', $command_tester->getDisplay());
+ $this->assertSame(true, $this->task->executed);
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_arg_invalid()
+ {
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name, 'name' => 'foo'));
+
+ $this->assertContains('CRON_NO_SUCH_TASK', $command_tester->getDisplay());
+ $this->assertSame(false, $this->task->executed);
+ $this->assertSame(2, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function test_arg_valid_verbose()
+ {
+ $command_tester = $this->get_command_tester();
+ $exit_status = $command_tester->execute(array('command' => $this->command_name, 'name' => 'phpbb_cron_task_simple', '--verbose' => true));
+
+ $this->assertContains('RUNNING_TASK', $command_tester->getDisplay());
+ $this->assertSame(true, $this->task->executed);
+ $this->assertSame(0, $exit_status);
+ $this->assertSame(false, $this->lock->owns_lock());
+ }
+
+ public function get_command_tester()
+ {
+ $application = new Application();
+ $application->add(new run($this->cron_manager, $this->lock, $this->user));
+
+ $command = $application->find('cron:run');
+ $this->command_name = $command->getName();
+ return new CommandTester($command);
+ }
+}
diff --git a/tests/console/cron/tasks/simple.php b/tests/console/cron/tasks/simple.php
new file mode 100644
index 0000000000..194c52afe1
--- /dev/null
+++ b/tests/console/cron/tasks/simple.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_cron_task_simple extends \phpbb\cron\task\base
+{
+ public $executed = false;
+
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ $this->executed = true;
+ }
+}
diff --git a/tests/console/cron/tasks/simple_not_ready.php b/tests/console/cron/tasks/simple_not_ready.php
new file mode 100644
index 0000000000..887768e5fe
--- /dev/null
+++ b/tests/console/cron/tasks/simple_not_ready.php
@@ -0,0 +1,13 @@
+<?php
+
+class phpbb_cron_task_simple_not_ready extends \phpbb\cron\task\base
+{
+ public function run()
+ {
+ }
+
+ public function should_run()
+ {
+ return false;
+ }
+}
diff --git a/tests/console/cron/tasks/simple_ready.php b/tests/console/cron/tasks/simple_ready.php
new file mode 100644
index 0000000000..47970e104f
--- /dev/null
+++ b/tests/console/cron/tasks/simple_ready.php
@@ -0,0 +1,8 @@
+<?php
+
+class phpbb_cron_task_simple_ready extends \phpbb\cron\task\base
+{
+ public function run()
+ {
+ }
+}
diff --git a/tests/content_visibility/delete_post_test.php b/tests/content_visibility/delete_post_test.php
index b2bdcb3b49..e0a2a3d402 100644
--- a/tests/content_visibility/delete_post_test.php
+++ b/tests/content_visibility/delete_post_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/content_visibility/fixtures/set_post_visibility.xml b/tests/content_visibility/fixtures/set_post_visibility.xml
index 5f792d0f05..1b8dac2670 100644
--- a/tests/content_visibility/fixtures/set_post_visibility.xml
+++ b/tests/content_visibility/fixtures/set_post_visibility.xml
@@ -10,6 +10,7 @@
<column>topic_posts_approved</column>
<column>topic_posts_softdeleted</column>
<column>topic_posts_unapproved</column>
+ <column>topic_attachment</column>
<row>
<value>1</value>
<value>1</value>
@@ -20,6 +21,7 @@
<value>1</value>
<value>1</value>
<value>1</value>
+ <value>0</value>
</row>
<row>
@@ -32,6 +34,7 @@
<value>1</value>
<value>1</value>
<value>1</value>
+ <value>0</value>
</row>
<row>
@@ -44,6 +47,33 @@
<value>1</value>
<value>0</value>
<value>0</value>
+ <value>0</value>
+ </row>
+
+ <row>
+ <value>10</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Only 3 posts (2 with attachments)</value>
+ <value>10</value>
+ <value>12</value>
+ <value>3</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
+ </row>
+
+ <row>
+ <value>11</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Only 2 posts (1 with attachments)</value>
+ <value>13</value>
+ <value>14</value>
+ <value>3</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
</row>
</table>
<table name="phpbb_posts">
@@ -53,6 +83,7 @@
<column>forum_id</column>
<column>post_visibility</column>
<column>post_text</column>
+ <column>post_attachment</column>
<row>
<value>1</value>
<value>1</value>
@@ -60,6 +91,7 @@
<value>1</value>
<value>0</value>
<value>Unapproved</value>
+ <value>0</value>
</row>
<row>
<value>2</value>
@@ -68,6 +100,7 @@
<value>1</value>
<value>1</value>
<value>Approved</value>
+ <value>0</value>
</row>
<row>
<value>3</value>
@@ -76,6 +109,7 @@
<value>1</value>
<value>2</value>
<value>Softdeleted</value>
+ <value>0</value>
</row>
<row>
@@ -85,6 +119,7 @@
<value>1</value>
<value>0</value>
<value>Unapproved</value>
+ <value>0</value>
</row>
<row>
<value>5</value>
@@ -93,6 +128,7 @@
<value>1</value>
<value>1</value>
<value>Approved</value>
+ <value>0</value>
</row>
<row>
<value>6</value>
@@ -101,6 +137,7 @@
<value>1</value>
<value>1</value>
<value>Approved 2</value>
+ <value>0</value>
</row>
<row>
<value>7</value>
@@ -109,6 +146,7 @@
<value>1</value>
<value>2</value>
<value>Softdeleted</value>
+ <value>0</value>
</row>
<row>
<value>8</value>
@@ -117,6 +155,52 @@
<value>1</value>
<value>1</value>
<value>Approved</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>10</value>
+ <value>1</value>
+ <value>10</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Softdeleted</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>11</value>
+ <value>1</value>
+ <value>10</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Softdeleted</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>12</value>
+ <value>1</value>
+ <value>10</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>13</value>
+ <value>1</value>
+ <value>11</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>14</value>
+ <value>1</value>
+ <value>11</value>
+ <value>10</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>0</value>
</row>
</table>
<table name="phpbb_users">
diff --git a/tests/content_visibility/get_forums_visibility_sql_test.php b/tests/content_visibility/get_forums_visibility_sql_test.php
index 22f210c406..9fd84d7c04 100644
--- a/tests/content_visibility/get_forums_visibility_sql_test.php
+++ b/tests/content_visibility/get_forums_visibility_sql_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/content_visibility/get_global_visibility_sql_test.php b/tests/content_visibility/get_global_visibility_sql_test.php
index 9488a8c0b3..6397cd6e45 100644
--- a/tests/content_visibility/get_global_visibility_sql_test.php
+++ b/tests/content_visibility/get_global_visibility_sql_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/content_visibility/get_visibility_sql_test.php b/tests/content_visibility/get_visibility_sql_test.php
index 111e735650..daad901b67 100644
--- a/tests/content_visibility/get_visibility_sql_test.php
+++ b/tests/content_visibility/get_visibility_sql_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/content_visibility/set_post_visibility_test.php b/tests/content_visibility/set_post_visibility_test.php
index f81b83ff86..abfefaddfa 100644
--- a/tests/content_visibility/set_post_visibility_test.php
+++ b/tests/content_visibility/set_post_visibility_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -140,4 +144,45 @@ class phpbb_content_visibility_set_post_visibility_test extends phpbb_database_t
$this->assertEquals($expected_topic, $db->sql_fetchrowset($result));
$db->sql_freeresult($result);
}
+
+ public function set_post_soft_deleted_data()
+ {
+ return array(
+ array(
+ 10, 10, 10,
+ 1, time(), 'soft-deleted',
+ true, false,
+ array(array('topic_attachment' => 1)),
+ ),
+ array(
+ 13, 11, 10,
+ 1, time(), 'soft-deleted',
+ true, false,
+ array(array('topic_attachment' => 0)),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider set_post_soft_deleted_data
+ */
+ public function test_set_post_soft_deleted($post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest, $expected)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $content_visibility->set_post_visibility(ITEM_DELETED, $post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest);
+
+ $result = $db->sql_query('SELECT topic_attachment
+ FROM phpbb_topics
+ WHERE topic_id = ' . $topic_id);
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+ }
}
diff --git a/tests/content_visibility/set_topic_visibility_test.php b/tests/content_visibility/set_topic_visibility_test.php
index 92b1253a15..6437c61436 100644
--- a/tests/content_visibility/set_topic_visibility_test.php
+++ b/tests/content_visibility/set_topic_visibility_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 7b8b78dd22..67faf83e29 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -68,7 +72,7 @@ class phpbb_controller_controller_test extends phpbb_test_case
include(__DIR__.'/phpbb/controller/foo.php');
}
- $resolver = new \phpbb\controller\resolver(new \phpbb\user, $container);
+ $resolver = new \phpbb\controller\resolver(new \phpbb\user, $container, dirname(__FILE__) . '/');
$symfony_request = new Request();
$symfony_request->attributes->set('_controller', 'foo.controller:handle');
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php
index ae6f924a62..df0794a047 100644
--- a/tests/controller/helper_route_test.php
+++ b/tests/controller/helper_route_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cron/ext/testext/cron/dummy_task.php b/tests/cron/ext/testext/cron/dummy_task.php
index 8cdb6b09d5..5c474dca4f 100644
--- a/tests/cron/ext/testext/cron/dummy_task.php
+++ b/tests/cron/ext/testext/cron/dummy_task.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cron/includes/cron/task/core/dummy_task.php b/tests/cron/includes/cron/task/core/dummy_task.php
index c34684701b..1ef28c5cca 100644
--- a/tests/cron/includes/cron/task/core/dummy_task.php
+++ b/tests/cron/includes/cron/task/core/dummy_task.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cron/includes/cron/task/core/second_dummy_task.php b/tests/cron/includes/cron/task/core/second_dummy_task.php
index 1b212ab05d..ada175a501 100644
--- a/tests/cron/includes/cron/task/core/second_dummy_task.php
+++ b/tests/cron/includes/cron/task/core/second_dummy_task.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php
index 937add252f..f4dd69b19b 100644
--- a/tests/cron/manager_test.php
+++ b/tests/cron/manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/datetime/from_format_test.php b/tests/datetime/from_format_test.php
index 34f7f9ae44..88eec525a3 100644
--- a/tests/datetime/from_format_test.php
+++ b/tests/datetime/from_format_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/auto_increment_test.php b/tests/dbal/auto_increment_test.php
index 2196292e83..1ed8ea29e3 100644
--- a/tests/dbal/auto_increment_test.php
+++ b/tests/dbal/auto_increment_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/case_test.php b/tests/dbal/case_test.php
index 57a1729a39..5f1c7d61fa 100644
--- a/tests/dbal/case_test.php
+++ b/tests/dbal/case_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/concatenate_test.php b/tests/dbal/concatenate_test.php
index 0891fa58a0..00e7e107aa 100644
--- a/tests/dbal/concatenate_test.php
+++ b/tests/dbal/concatenate_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/connect_test.php b/tests/dbal/connect_test.php
index 1e352d6b03..1ae34bd2b6 100644
--- a/tests/dbal/connect_test.php
+++ b/tests/dbal/connect_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/cross_join_test.php b/tests/dbal/cross_join_test.php
index 6c6b8a8449..7ba937ccc6 100644
--- a/tests/dbal/cross_join_test.php
+++ b/tests/dbal/cross_join_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index df8f22083b..320eac3bf3 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/fixtures/styles.xml b/tests/dbal/fixtures/styles.xml
index dcbe39d3b0..d51dcd0320 100644
--- a/tests/dbal/fixtures/styles.xml
+++ b/tests/dbal/fixtures/styles.xml
@@ -12,7 +12,7 @@
<row>
<value>1</value>
<value>prosilver</value>
- <value>&amp;copy; phpBB Group</value>
+ <value>&amp;copy; phpBB Limited</value>
<value>1</value>
<value>prosilver</value>
<value>kNg=</value>
@@ -22,7 +22,7 @@
<row>
<value>2</value>
<value>prosilver2</value>
- <value>&amp;copy; phpBB Group</value>
+ <value>&amp;copy; phpBB Limited</value>
<value>0</value>
<value>prosilver2</value>
<value>kNg=</value>
@@ -32,7 +32,7 @@
<row>
<value>3</value>
<value>Prosilver1</value>
- <value>&amp;copy; phpBB Group</value>
+ <value>&amp;copy; phpBB Limited</value>
<value>0</value>
<value>prosilver1</value>
<value>kNg=</value>
diff --git a/tests/dbal/migration/dummy.php b/tests/dbal/migration/dummy.php
index b68a3673c1..d564754892 100644
--- a/tests/dbal/migration/dummy.php
+++ b/tests/dbal/migration/dummy.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/dummy_order.php b/tests/dbal/migration/dummy_order.php
new file mode 100644
index 0000000000..5ab8f5d129
--- /dev/null
+++ b/tests/dbal/migration/dummy_order.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'COLUMNS' => array(
+ 'foobar1' => array('BOOL', 0),
+ 'foobar3' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar1'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_0.php b/tests/dbal/migration/dummy_order_0.php
new file mode 100644
index 0000000000..4caea76704
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_0.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_0 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar2' => array('BOOL', 0, 'after' => 'foobar1'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_1.php b/tests/dbal/migration/dummy_order_1.php
new file mode 100644
index 0000000000..ea512765fa
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_1.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_1 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar4' => array('BOOL', 0, 'after' => 'foobar3'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_2.php b/tests/dbal/migration/dummy_order_2.php
new file mode 100644
index 0000000000..a7669b1ac8
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_2.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_2 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar5' => array('BOOL', 0, 'after' => 'non-existing'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_3.php b/tests/dbal/migration/dummy_order_3.php
new file mode 100644
index 0000000000..501db09b7e
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_3.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_3 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar6' => array('BOOL', 0, 'after' => ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_4.php b/tests/dbal/migration/dummy_order_4.php
new file mode 100644
index 0000000000..77bb5a24b3
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_4.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_4 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar7' => array('BOOL', 0),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/dummy_order_5.php b/tests/dbal/migration/dummy_order_5.php
new file mode 100644
index 0000000000..8f92392a8b
--- /dev/null
+++ b/tests/dbal/migration/dummy_order_5.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_dummy_order_5 extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test1' => array(
+ 'foobar8' => array('BOOL', 0, 'after' => 'foobar3'),
+ 'foobar9' => array('BOOL', 0, 'after' => 'foobar3'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/fail.php b/tests/dbal/migration/fail.php
index b0702a469a..a7a8a41694 100644
--- a/tests/dbal/migration/fail.php
+++ b/tests/dbal/migration/fail.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package migration
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/if.php b/tests/dbal/migration/if.php
index 883d93c6e4..98a66526ed 100644
--- a/tests/dbal/migration/if.php
+++ b/tests/dbal/migration/if.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/installed.php b/tests/dbal/migration/installed.php
index cc4e81aff6..83edaae23a 100644
--- a/tests/dbal/migration/installed.php
+++ b/tests/dbal/migration/installed.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/recall.php b/tests/dbal/migration/recall.php
index af5e9243cf..c0333b084d 100644
--- a/tests/dbal/migration/recall.php
+++ b/tests/dbal/migration/recall.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/revert.php b/tests/dbal/migration/revert.php
index 1c98710ffb..7da65a83f1 100644
--- a/tests/dbal/migration/revert.php
+++ b/tests/dbal/migration/revert.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/revert_with_dependency.php b/tests/dbal/migration/revert_with_dependency.php
index ece16eb67c..43e9a4aa42 100644
--- a/tests/dbal/migration/revert_with_dependency.php
+++ b/tests/dbal/migration/revert_with_dependency.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/schema.php b/tests/dbal/migration/schema.php
index efe6891aaa..38663bcc16 100644
--- a/tests/dbal/migration/schema.php
+++ b/tests/dbal/migration/schema.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migration/unfulfillable.php b/tests/dbal/migration/unfulfillable.php
index 125629d27c..11c87a6b85 100644
--- a/tests/dbal/migration/unfulfillable.php
+++ b/tests/dbal/migration/unfulfillable.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index cc3e92071f..4a1d15aea4 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -56,12 +60,14 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$container = new phpbb_mock_container_builder();
$container->set('migrator', $migrator);
+ $user = new \phpbb\user();
$this->extension_manager = new \phpbb\extension\manager(
$container,
$this->db,
$this->config,
new phpbb\filesystem(),
+ $user,
'phpbb_ext',
dirname(__FILE__) . '/../../phpBB/',
'php',
diff --git a/tests/dbal/migrator_tool_config_test.php b/tests/dbal/migrator_tool_config_test.php
index 12644e4a23..13e0c13e3c 100644
--- a/tests/dbal/migrator_tool_config_test.php
+++ b/tests/dbal/migrator_tool_config_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php
index c3358ef944..aeb69e27ac 100644
--- a/tests/dbal/migrator_tool_module_test.php
+++ b/tests/dbal/migrator_tool_module_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/migrator_tool_permission_test.php b/tests/dbal/migrator_tool_permission_test.php
index 4016cbcf20..4453fbf123 100644
--- a/tests/dbal/migrator_tool_permission_test.php
+++ b/tests/dbal/migrator_tool_permission_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php
index d826765681..b7a69c7c5d 100644
--- a/tests/dbal/order_lower_test.php
+++ b/tests/dbal/order_lower_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -36,7 +40,7 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case
array(
'style_id' => 1,
'style_name' => 'prosilver',
- 'style_copyright' => '&copy; phpBB Group',
+ 'style_copyright' => '&copy; phpBB Limited',
'style_active' => 1,
'style_path' => 'prosilver',
'bbcode_bitfield' => 'kNg=',
@@ -46,7 +50,7 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case
array(
'style_id' => 3,
'style_name' => 'Prosilver1',
- 'style_copyright' => '&copy; phpBB Group',
+ 'style_copyright' => '&copy; phpBB Limited',
'style_active' => 0,
'style_path' => 'prosilver1',
'bbcode_bitfield' => 'kNg=',
@@ -56,7 +60,7 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case
array(
'style_id' => 2,
'style_name' => 'prosilver2',
- 'style_copyright' => '&copy; phpBB Group',
+ 'style_copyright' => '&copy; phpBB Limited',
'style_active' => 0,
'style_path' => 'prosilver2',
'bbcode_bitfield' => 'kNg=',
diff --git a/tests/dbal/schema_test.php b/tests/dbal/schema_test.php
index 2a332fddba..f13c7ce032 100644
--- a/tests/dbal/schema_test.php
+++ b/tests/dbal/schema_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php
index c8cfad04e0..7cac4d6a3b 100644
--- a/tests/dbal/select_test.php
+++ b/tests/dbal/select_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/sql_affected_rows_test.php b/tests/dbal/sql_affected_rows_test.php
new file mode 100644
index 0000000000..07d7318358
--- /dev/null
+++ b/tests/dbal/sql_affected_rows_test.php
@@ -0,0 +1,68 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_sql_affected_rows_test extends phpbb_database_test_case
+{
+ /** @var \phpbb\db\driver\driver_interface */
+ protected $db;
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->db = $this->new_dbal();
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ public function test_update()
+ {
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = 'bertie'";
+ $this->db->sql_query($sql);
+
+ $this->assertEquals(2, $this->db->sql_affectedrows());
+ }
+
+ public function test_update_all_matched_unequal_updated()
+ {
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = 'foo'";
+ $this->db->sql_query($sql);
+
+ $this->assertEquals(2, $this->db->sql_affectedrows());
+ }
+
+ public function test_update_same_value_matched_unequal_updated()
+ {
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = 'foo'
+ WHERE config_value = 'foo'";
+ $this->db->sql_query($sql);
+
+ $this->assertEquals(1, $this->db->sql_affectedrows());
+ }
+
+ public function test_insert()
+ {
+ $sql = 'INSERT INTO ' . CONFIG_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'config_name' => 'bertie',
+ 'config_value' => 'rules',
+ ));
+ $this->db->sql_query($sql);
+
+ $this->assertEquals(1, $this->db->sql_affectedrows());
+ }
+}
diff --git a/tests/dbal/sql_insert_buffer_test.php b/tests/dbal/sql_insert_buffer_test.php
index a70eea4f7e..2f9ed0008f 100644
--- a/tests/dbal/sql_insert_buffer_test.php
+++ b/tests/dbal/sql_insert_buffer_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/write_sequence_test.php b/tests/dbal/write_sequence_test.php
index 5fe0fe8de9..a1b589c578 100644
--- a/tests/dbal/write_sequence_test.php
+++ b/tests/dbal/write_sequence_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php
index c069d9a796..2426f2b0be 100644
--- a/tests/dbal/write_test.php
+++ b/tests/dbal/write_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php
index 46d97ba8ba..8bf9f636fa 100644
--- a/tests/di/create_container_test.php
+++ b/tests/di/create_container_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/download/http_byte_range_test.php b/tests/download/http_byte_range_test.php
index 23b9169fe3..f920299048 100644
--- a/tests/download/http_byte_range_test.php
+++ b/tests/download/http_byte_range_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/download/http_user_agent_test.php b/tests/download/http_user_agent_test.php
index 166a186913..bfee265add 100644
--- a/tests/download/http_user_agent_test.php
+++ b/tests/download/http_user_agent_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/error_collector_test.php b/tests/error_collector_test.php
index 0804c64f6f..1d8ef367f5 100644
--- a/tests/error_collector_test.php
+++ b/tests/error_collector_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/event/dispatcher_test.php b/tests/event/dispatcher_test.php
index a76df90809..7bba5bf337 100644
--- a/tests/event/dispatcher_test.php
+++ b/tests/event/dispatcher_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/event/export_php_test.php b/tests/event/export_php_test.php
index f38b524ffe..21bbb0620a 100644
--- a/tests/event/export_php_test.php
+++ b/tests/event/export_php_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/event/md_exporter_test.php b/tests/event/md_exporter_test.php
index b62b55accd..0f9d855caa 100644
--- a/tests/event/md_exporter_test.php
+++ b/tests/event/md_exporter_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index 9917f8309b..823d90b63f 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
index d0ca5956b4..8cc5146b33 100644
--- a/tests/extension/finder_test.php
+++ b/tests/extension/finder_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
@@ -128,6 +132,22 @@ class phpbb_extension_finder_test extends phpbb_test_case
);
}
+ public function test_non_absolute_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->directory('type/')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\vendor2\foo\sub\type\alternative',
+ '\vendor2\foo\type\alternative',
+ ),
+ $classes
+ );
+ }
+
public function test_sub_directory_get_classes()
{
$classes = $this->finder
diff --git a/tests/extension/includes/acp/acp_foobar.php b/tests/extension/includes/acp/acp_foobar.php
index c256a432e2..c4591cae07 100644
--- a/tests/extension/includes/acp/acp_foobar.php
+++ b/tests/extension/includes/acp/acp_foobar.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -15,9 +19,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-/**
-* @package acp
-*/
class acp_foobar
{
var $u_action;
diff --git a/tests/extension/includes/acp/info/acp_foobar.php b/tests/extension/includes/acp/info/acp_foobar.php
index b89cfb9574..870225ba4f 100644
--- a/tests/extension/includes/acp/info/acp_foobar.php
+++ b/tests/extension/includes/acp/info/acp_foobar.php
@@ -1,15 +1,16 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
-/**
-* @package module_install
-*/
class acp_foobar_info
{
function module()
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index 789dc20d14..d9f8fbd1a4 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -97,6 +101,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$phpbb_root_path = __DIR__ . './../../phpBB/';
$php_ext = 'php';
$table_prefix = 'phpbb_';
+ $user = new \phpbb\user();
$migrator = new \phpbb\db\migrator(
$config,
@@ -117,6 +122,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$db,
$config,
new \phpbb\filesystem(),
+ $user,
'phpbb_ext',
dirname(__FILE__) . '/',
$php_ext,
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index a3584be67b..3678ac0a3f 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -73,6 +77,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->db,
$this->config,
new \phpbb\filesystem(),
+ $this->user,
'phpbb_ext',
$this->phpbb_root_path,
$this->phpEx,
@@ -93,7 +98,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e){}
- $this->assertEquals((string) $e, 'The required file does not exist: ' . $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json');
+ $this->assertEquals((string) $e, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json'));
}
// Should be the same as a direct json_decode of the composer.json file
@@ -132,7 +137,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'name\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'name'));
}
try
@@ -143,7 +148,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'type\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'type'));
}
try
@@ -154,7 +159,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'license\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'license'));
}
try
@@ -165,7 +170,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'version\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'version'));
}
try
@@ -176,7 +181,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'authors\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'authors'));
}
$manager->merge_metadata(array(
@@ -193,7 +198,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Required meta field \'author name\' has not been set.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'author name'));
}
}
@@ -220,7 +225,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Meta field \'name\' is invalid.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'name'));
}
try
@@ -231,7 +236,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Meta field \'type\' is invalid.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'type'));
}
try
@@ -242,7 +247,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Meta field \'license\' is invalid.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'license'));
}
try
@@ -253,7 +258,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, 'Meta field \'version\' is invalid.');
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'version'));
}
}
@@ -433,6 +438,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->config,
$this->extension_manager,
$this->template,
+ $this->user,
$this->phpbb_root_path
);
}
diff --git a/tests/extension/modules_test.php b/tests/extension/modules_test.php
index e396b7b73e..21f1c6aca5 100644
--- a/tests/extension/modules_test.php
+++ b/tests/extension/modules_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/filesystem/clean_path_test.php b/tests/filesystem/clean_path_test.php
index fedadc103b..1aef0d8a0c 100644
--- a/tests/filesystem/clean_path_test.php
+++ b/tests/filesystem/clean_path_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/acp_groups_test.php b/tests/functional/acp_groups_test.php
index cdf8bf5117..4eb4747572 100644
--- a/tests/functional/acp_groups_test.php
+++ b/tests/functional/acp_groups_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/acp_permissions_test.php b/tests/functional/acp_permissions_test.php
index e17f33dc96..0a40e76057 100644
--- a/tests/functional/acp_permissions_test.php
+++ b/tests/functional/acp_permissions_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/acp_users_test.php b/tests/functional/acp_users_test.php
index 50d9a67dc1..78028aacb8 100644
--- a/tests/functional/acp_users_test.php
+++ b/tests/functional/acp_users_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php
index d3fed18094..b4b4279bf1 100644
--- a/tests/functional/auth_test.php
+++ b/tests/functional/auth_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/avatar_acp_groups_test.php b/tests/functional/avatar_acp_groups_test.php
index 5f767b44f2..35f7956252 100644
--- a/tests/functional/avatar_acp_groups_test.php
+++ b/tests/functional/avatar_acp_groups_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/common_avatar_test.php';
diff --git a/tests/functional/avatar_acp_users_test.php b/tests/functional/avatar_acp_users_test.php
index 0afd05e530..38e001f516 100644
--- a/tests/functional/avatar_acp_users_test.php
+++ b/tests/functional/avatar_acp_users_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/common_avatar_test.php';
diff --git a/tests/functional/avatar_ucp_groups_test.php b/tests/functional/avatar_ucp_groups_test.php
index 233b7d36e1..fddf66933f 100644
--- a/tests/functional/avatar_ucp_groups_test.php
+++ b/tests/functional/avatar_ucp_groups_test.php
@@ -1,12 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
-
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/common_avatar_test.php';
/**
diff --git a/tests/functional/avatar_ucp_users_test.php b/tests/functional/avatar_ucp_users_test.php
index f828559e0d..62cd79c307 100644
--- a/tests/functional/avatar_ucp_users_test.php
+++ b/tests/functional/avatar_ucp_users_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/common_avatar_test.php';
diff --git a/tests/functional/browse_test.php b/tests/functional/browse_test.php
index c3be301762..b9e74a280f 100644
--- a/tests/functional/browse_test.php
+++ b/tests/functional/browse_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/common_avatar_test.php b/tests/functional/common_avatar_test.php
index 1fd8f2ed6f..1bb9e5cd8e 100644
--- a/tests/functional/common_avatar_test.php
+++ b/tests/functional/common_avatar_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* @group functional
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php
index 950db24767..748d4d5e0a 100644
--- a/tests/functional/common_groups_test.php
+++ b/tests/functional/common_groups_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index 087250157d..dbf197fcfa 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php
index 5f02158e20..b6dd5db708 100644
--- a/tests/functional/extension_acp_test.php
+++ b/tests/functional/extension_acp_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -157,7 +161,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
$this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
- $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('.errorbox')->text());
+ $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('#main')->text());
}
public function test_disable_pre()
@@ -169,14 +173,14 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
$this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
- $this->assertContains($this->lang('EXTENSION_DISABLE_CONFIRM', 'phpBB Foo Extension'), $crawler->filter('.errorbox')->text());
+ $this->assertContains($this->lang('EXTENSION_DISABLE_CONFIRM', 'phpBB Foo Extension'), $crawler->filter('#main')->text());
}
public function test_delete_data_pre()
{
// test2 is not available (error)
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=test2&sid=' . $this->sid);
- $this->assertContains('The required file does not exist', $crawler->filter('.errorbox')->text());
+ $this->assertContains($this->lang('FILE_NOT_FOUND', ''), $crawler->filter('.errorbox')->text());
// foo is not disabled (redirect to list)
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index 57b0f56bee..532a160a47 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php
index 094eda8257..53bb9af5ca 100644
--- a/tests/functional/extension_global_lang_test.php
+++ b/tests/functional/extension_global_lang_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/extension_module_test.php b/tests/functional/extension_module_test.php
index ba025d582e..ee084720e4 100644
--- a/tests/functional/extension_module_test.php
+++ b/tests/functional/extension_module_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/acp/acp_modules.php';
diff --git a/tests/functional/extension_permission_lang_test.php b/tests/functional/extension_permission_lang_test.php
index e922abdaf1..92d8d596c7 100644
--- a/tests/functional/extension_permission_lang_test.php
+++ b/tests/functional/extension_permission_lang_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index 86d3930a7b..a474ecf27f 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
index 30f6fd7b47..cf36a0523f 100644
--- a/tests/functional/fileupload_form_test.php
+++ b/tests/functional/fileupload_form_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* @group functional
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
index 65c4b6b7c4..f904258a5c 100644
--- a/tests/functional/fileupload_remote_test.php
+++ b/tests/functional/fileupload_remote_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* @group functional
diff --git a/tests/functional/fixtures/ext/foo/bar/acp/main_info.php b/tests/functional/fixtures/ext/foo/bar/acp/main_info.php
index 2ad6d08503..ec378e0e75 100644
--- a/tests/functional/fixtures/ext/foo/bar/acp/main_info.php
+++ b/tests/functional/fixtures/ext/foo/bar/acp/main_info.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fixtures/ext/foo/bar/acp/main_module.php b/tests/functional/fixtures/ext/foo/bar/acp/main_module.php
index c59b3c6820..ee797c718d 100644
--- a/tests/functional/fixtures/ext/foo/bar/acp/main_module.php
+++ b/tests/functional/fixtures/ext/foo/bar/acp/main_module.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fixtures/ext/foo/bar/event/permission.php b/tests/functional/fixtures/ext/foo/bar/event/permission.php
index 9b319dd35f..cdbdf40465 100644
--- a/tests/functional/fixtures/ext/foo/bar/event/permission.php
+++ b/tests/functional/fixtures/ext/foo/bar/event/permission.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fixtures/ext/foo/bar/event/user_setup.php b/tests/functional/fixtures/ext/foo/bar/event/user_setup.php
index 8fa7ac97da..3a60019f68 100644
--- a/tests/functional/fixtures/ext/foo/bar/event/user_setup.php
+++ b/tests/functional/fixtures/ext/foo/bar/event/user_setup.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php b/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php
index 2ba37f3050..d34244f800 100644
--- a/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php
+++ b/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php b/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php
index cd3dacc9db..f1cd03f4ab 100644
--- a/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php
+++ b/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php
@@ -1,10 +1,13 @@
<?php
-
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/forgot_password_test.php b/tests/functional/forgot_password_test.php
index 3b6fd15d02..64fa19557f 100644
--- a/tests/functional/forgot_password_test.php
+++ b/tests/functional/forgot_password_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/forum_password_test.php b/tests/functional/forum_password_test.php
index 40a8059ad1..4b2b69a92c 100644
--- a/tests/functional/forum_password_test.php
+++ b/tests/functional/forum_password_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/forum_style_test.php b/tests/functional/forum_style_test.php
index 59f7341eb6..65be94f4d0 100644
--- a/tests/functional/forum_style_test.php
+++ b/tests/functional/forum_style_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/group_create_test.php b/tests/functional/group_create_test.php
index 96780069f7..a1417b5ba0 100644
--- a/tests/functional/group_create_test.php
+++ b/tests/functional/group_create_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/jumpbox_test.php b/tests/functional/jumpbox_test.php
index b987d2b99b..9eddcb6bf6 100644
--- a/tests/functional/jumpbox_test.php
+++ b/tests/functional/jumpbox_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/lang_test.php b/tests/functional/lang_test.php
index 053806a431..7cffd0ef61 100644
--- a/tests/functional/lang_test.php
+++ b/tests/functional/lang_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/mcp_test.php b/tests/functional/mcp_test.php
index f65a7d0784..e4d950ef34 100644
--- a/tests/functional/mcp_test.php
+++ b/tests/functional/mcp_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php
index b7f7a1823d..c76ba6e37d 100644
--- a/tests/functional/memberlist_test.php
+++ b/tests/functional/memberlist_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
index ac08a44e30..080822d249 100644
--- a/tests/functional/metadata_manager_test.php
+++ b/tests/functional/metadata_manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -78,6 +82,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=not%2Fexists&sid=' . $this->sid);
// Error message because the files do not exist
- $this->assertContains('The required file does not exist:', $crawler->filter('#main')->text());
+ $this->assertContains($this->lang('FILE_NOT_FOUND', ''), $crawler->filter('#main')->text());
}
}
diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php
index 18e8a4ecc0..e4a960f862 100644
--- a/tests/functional/notification_test.php
+++ b/tests/functional/notification_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php
index b0e4743d5b..97ce822fdf 100644
--- a/tests/functional/paging_test.php
+++ b/tests/functional/paging_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
index a91e70c7bb..ee71597ffc 100644
--- a/tests/functional/plupload_test.php
+++ b/tests/functional/plupload_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* @group functional
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index dd95704952..2611ef7bf1 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/prune_shadow_topic_test.php b/tests/functional/prune_shadow_topic_test.php
index a9fd2457bb..84f07e9802 100644
--- a/tests/functional/prune_shadow_topic_test.php
+++ b/tests/functional/prune_shadow_topic_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/registration_test.php b/tests/functional/registration_test.php
index 5baf33c59e..45a684db19 100644
--- a/tests/functional/registration_test.php
+++ b/tests/functional/registration_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/report_post_captcha_test.php b/tests/functional/report_post_captcha_test.php
index 8283465041..93a03bd931 100644
--- a/tests/functional/report_post_captcha_test.php
+++ b/tests/functional/report_post_captcha_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* @group functional
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
index 0bd9bf01ab..1d37d748df 100644
--- a/tests/functional/search/base.php
+++ b/tests/functional/search/base.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php
index 52a7b14f40..a97b12e905 100644
--- a/tests/functional/search/mysql_test.php
+++ b/tests/functional/search/mysql_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php
index 512c6f2830..9908b9cdaa 100644
--- a/tests/functional/search/native_test.php
+++ b/tests/functional/search/native_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php
index 974b417659..a76cc13493 100644
--- a/tests/functional/search/postgres_test.php
+++ b/tests/functional/search/postgres_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php
index ef2522f9ed..4bf1ab0e16 100644
--- a/tests/functional/search/sphinx_test.php
+++ b/tests/functional/search/sphinx_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/ucp_allow_pm_test.php b/tests/functional/ucp_allow_pm_test.php
index b433ec8e75..2d41296ddf 100644
--- a/tests/functional/ucp_allow_pm_test.php
+++ b/tests/functional/ucp_allow_pm_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/ucp_groups_test.php b/tests/functional/ucp_groups_test.php
index f48c793ea1..2b075b37a5 100644
--- a/tests/functional/ucp_groups_test.php
+++ b/tests/functional/ucp_groups_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/ucp_pm_test.php b/tests/functional/ucp_pm_test.php
index 09521cc9f4..ddd5c8d791 100644
--- a/tests/functional/ucp_pm_test.php
+++ b/tests/functional/ucp_pm_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php
index e0e6255f79..ea08eece78 100644
--- a/tests/functional/ucp_profile_test.php
+++ b/tests/functional/ucp_profile_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/user_password_reset_test.php b/tests/functional/user_password_reset_test.php
index 65222c1aa6..f9406f0eb5 100644
--- a/tests/functional/user_password_reset_test.php
+++ b/tests/functional/user_password_reset_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/visibility_disapprove_test.php b/tests/functional/visibility_disapprove_test.php
index ca6f6f5f37..6f6edba422 100644
--- a/tests/functional/visibility_disapprove_test.php
+++ b/tests/functional/visibility_disapprove_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functional/visibility_reapprove_test.php b/tests/functional/visibility_reapprove_test.php
index 70134ef724..5af2ddafa4 100644
--- a/tests/functional/visibility_reapprove_test.php
+++ b/tests/functional/visibility_reapprove_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -208,8 +212,7 @@ class phpbb_functional_visibility_reapprove_test extends phpbb_functional_test_c
$crawler = self::submit($form);
$form = $crawler->selectButton($this->lang('YES'))->form();
$crawler = self::submit($form);
- //@todo $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text());
- $this->assertContainsLang('POST_APPROVED_SUCCESS', $crawler->text());
+ $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text());
$this->assert_forum_details($this->data['forums']['Reapprove Test #1'], array(
'forum_posts_approved' => 3,
diff --git a/tests/functional/visibility_softdelete_test.php b/tests/functional/visibility_softdelete_test.php
index d92ff7425d..5b5f09905c 100644
--- a/tests/functional/visibility_softdelete_test.php
+++ b/tests/functional/visibility_softdelete_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/build_hidden_fields_for_query_params_test.php b/tests/functions/build_hidden_fields_for_query_params_test.php
index ef2f5744d3..14cb4b9a94 100644
--- a/tests/functions/build_hidden_fields_for_query_params_test.php
+++ b/tests/functions/build_hidden_fields_for_query_params_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php
index ad36f29b8c..7a70bddc71 100644
--- a/tests/functions/build_url_test.php
+++ b/tests/functions/build_url_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/convert_30_dbms_to_31_test.php b/tests/functions/convert_30_dbms_to_31_test.php
index 4d210d7b29..9647eb341c 100644
--- a/tests/functions/convert_30_dbms_to_31_test.php
+++ b/tests/functions/convert_30_dbms_to_31_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/generate_string_list.php b/tests/functions/generate_string_list.php
index cfc150c1f4..32a04c1501 100644
--- a/tests/functions/generate_string_list.php
+++ b/tests/functions/generate_string_list.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/get_formatted_filesize_test.php b/tests/functions/get_formatted_filesize_test.php
index 96ea2be132..635753d737 100644
--- a/tests/functions/get_formatted_filesize_test.php
+++ b/tests/functions/get_formatted_filesize_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/get_remote_file_test.php b/tests/functions/get_remote_file_test.php
index 4032ca5b58..d412dce164 100644
--- a/tests/functions/get_remote_file_test.php
+++ b/tests/functions/get_remote_file_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/is_absolute_test.php b/tests/functions/is_absolute_test.php
index 6d26793d82..afa4b9b59f 100644
--- a/tests/functions/is_absolute_test.php
+++ b/tests/functions/is_absolute_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/language_select_test.php b/tests/functions/language_select_test.php
index 3341e2a256..6762ead5a1 100644
--- a/tests/functions/language_select_test.php
+++ b/tests/functions/language_select_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php
index cf42fd5b58..830b52fb4c 100644
--- a/tests/functions/obtain_online_test.php
+++ b/tests/functions/obtain_online_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/parse_cfg_file_test.php b/tests/functions/parse_cfg_file_test.php
index 920fc2eaa7..b47e25fbc1 100644
--- a/tests/functions/parse_cfg_file_test.php
+++ b/tests/functions/parse_cfg_file_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -19,10 +23,13 @@ class phpbb_functions_parse_cfg_file extends phpbb_test_case
'#',
'# phpBB Style Configuration File',
'#',
- '# @package phpBB3',
- '# @copyright (c) 2005 phpBB Group',
- '# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2',
+ '# This file is part of the phpBB Forum Software package.',
+ '#',
+ '# @copyright (c) phpBB Limited <https://www.phpbb.com>',
+ '# @license GNU General Public License, version 2 (GPL-2.0)',
'#',
+ '# For full copyright and license information, please see',
+ '# the docs/CREDITS.txt file.',
'#',
'# At the left is the name, please do not change this',
'# At the right the value is entered',
@@ -35,24 +42,24 @@ class phpbb_functions_parse_cfg_file extends phpbb_test_case
'',
'# General Information about this style',
'name = prosilver',
- 'copyright = © phpBB Group, 2007',
+ 'copyright = © phpBB Limited, 2007',
'version = 3.0.12',
),
array(
'name' => 'prosilver',
- 'copyright' => '© phpBB Group, 2007',
+ 'copyright' => '© phpBB Limited, 2007',
'version' => '3.0.12',
),
),
array(
array(
'name = subsilver2',
- 'copyright = © 2005 phpBB Group',
+ 'copyright = © 2005 phpBB Limited',
'version = 3.0.12',
),
array(
'name' => 'subsilver2',
- 'copyright' => '© 2005 phpBB Group',
+ 'copyright' => '© 2005 phpBB Limited',
'version' => '3.0.12',
),
),
diff --git a/tests/functions/phpbb_get_banned_user_ids.php b/tests/functions/phpbb_get_banned_user_ids.php
index 96de5c5767..6f7607132e 100644
--- a/tests/functions/phpbb_get_banned_user_ids.php
+++ b/tests/functions/phpbb_get_banned_user_ids.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/quoteattr_test.php b/tests/functions/quoteattr_test.php
index 9d2a7d470e..6e191f9610 100644
--- a/tests/functions/quoteattr_test.php
+++ b/tests/functions/quoteattr_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/style_select_test.php b/tests/functions/style_select_test.php
index 1e44f3c2cb..a918f83155 100644
--- a/tests/functions/style_select_test.php
+++ b/tests/functions/style_select_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_data_helper.php b/tests/functions/validate_data_helper.php
index b92a3aa5eb..448d029d3f 100644
--- a/tests/functions/validate_data_helper.php
+++ b/tests/functions/validate_data_helper.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_date_test.php b/tests/functions/validate_date_test.php
index 1dcd1361a2..9dc0db46d6 100644
--- a/tests/functions/validate_date_test.php
+++ b/tests/functions/validate_date_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_email_test.php b/tests/functions/validate_email_test.php
index 9a6ce39251..b46509fda7 100644
--- a/tests/functions/validate_email_test.php
+++ b/tests/functions/validate_email_test.php
@@ -2,7 +2,7 @@
/**
*
* @package testing
-* @copyright (c) 2013 phpBB Group
+* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -47,60 +47,54 @@ class phpbb_functions_validate_email_test extends phpbb_database_test_case
$user->optionset('banned_users', array('banned@example.com'));
}
- public function test_validate_email()
+ public static function validate_email_data()
+ {
+ return array(
+ array('empty', array('EMAIL_INVALID'), ''), // email does not allow empty
+ array('allowed', array(), 'foobar@example.com'),
+ array('valid_complex', array(), "'%$~test@example.com"),
+ array('invalid', array('EMAIL_INVALID'), 'fööbar@example.com'),
+ array('taken', array(), 'admin@example.com'), // email does not check taken, should use user_email instead
+ array('banned', array(), 'banned@example.com'), // email does not check ban, should use user_email instead
+ );
+ }
+
+ /**
+ * @dataProvider validate_email_data
+ */
+ public function test_validate_email($case, $errors, $email)
{
$this->set_validation_prerequisites(false);
$this->helper->assert_valid_data(array(
- 'empty' => array(
- array(),
- '',
- array('email'),
- ),
- 'allowed' => array(
- array(),
- 'foobar@example.com',
- array('email', 'foobar@example.com'),
- ),
- 'invalid' => array(
- array('EMAIL_INVALID'),
- 'fööbar@example.com',
- array('email'),
- ),
- 'valid_complex' => array(
- array(),
- "'%$~test@example.com",
- array('email'),
- ),
- 'taken' => array(
- array('EMAIL_TAKEN'),
- 'admin@example.com',
- array('email'),
- ),
- 'banned' => array(
- array('EMAIL_BANNED'),
- 'banned@example.com',
+ $case => array(
+ $errors,
+ $email,
array('email'),
),
));
}
+ public static function validate_email_mx_data()
+ {
+ return array(
+ array('valid', array(), 'foobar@phpbb.com'),
+ array('no_mx', array('DOMAIN_NO_MX_RECORD'), 'test@does-not-exist.phpbb.com'),
+ );
+ }
+
/**
+ * @dataProvider validate_email_mx_data
* @group slow
*/
- public function test_validate_email_mx()
+ public function test_validate_email_mx($case, $errors, $email)
{
$this->set_validation_prerequisites(true);
$this->helper->assert_valid_data(array(
- 'valid' => array(
- array(),
- 'foobar@phpbb.com',
- array('email'),
- ),
- 'no_mx' => array(
- array('DOMAIN_NO_MX_RECORD'),
- 'test@does-not-exist.phpbb.com',
+ $case => array(
+ $errors,
+ $email,
array('email'),
),
));
diff --git a/tests/functions/validate_hex_colour_test.php b/tests/functions/validate_hex_colour_test.php
index 812ebe5eeb..b2c4862458 100644
--- a/tests/functions/validate_hex_colour_test.php
+++ b/tests/functions/validate_hex_colour_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_jabber_test.php b/tests/functions/validate_jabber_test.php
index 5a53c963bd..23811a94c0 100644
--- a/tests/functions/validate_jabber_test.php
+++ b/tests/functions/validate_jabber_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_lang_iso_test.php b/tests/functions/validate_lang_iso_test.php
index c8a5b71021..81b56055e6 100644
--- a/tests/functions/validate_lang_iso_test.php
+++ b/tests/functions/validate_lang_iso_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_match_test.php b/tests/functions/validate_match_test.php
index 73a363e003..811bed3e33 100644
--- a/tests/functions/validate_match_test.php
+++ b/tests/functions/validate_match_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_num_test.php b/tests/functions/validate_num_test.php
index 4deac02ebc..798468759c 100644
--- a/tests/functions/validate_num_test.php
+++ b/tests/functions/validate_num_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_password_test.php b/tests/functions/validate_password_test.php
index 82c5fa03c1..c5942e79bf 100644
--- a/tests/functions/validate_password_test.php
+++ b/tests/functions/validate_password_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_string_test.php b/tests/functions/validate_string_test.php
index ab44c28541..24026e4c9f 100644
--- a/tests/functions/validate_string_test.php
+++ b/tests/functions/validate_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_user_email_test.php b/tests/functions/validate_user_email_test.php
new file mode 100644
index 0000000000..951d5794e6
--- /dev/null
+++ b/tests/functions/validate_user_email_test.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
+require_once dirname(__FILE__) . '/../mock/user.php';
+require_once dirname(__FILE__) . '/validate_data_helper.php';
+
+class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $user;
+ protected $helper;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/validate_email.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+ $this->user = new phpbb_mock_user;
+ $this->helper = new phpbb_functions_validate_data_helper($this);
+ }
+
+ /**
+ * Get validation prerequesites
+ *
+ * @param bool $check_mx Whether mx records should be checked
+ */
+ protected function set_validation_prerequisites($check_mx)
+ {
+ global $config, $db, $user;
+
+ $config['email_check_mx'] = $check_mx;
+ $db = $this->db;
+ $user = $this->user;
+ $user->optionset('banned_users', array('banned@example.com'));
+ }
+
+ public static function validate_user_email_data()
+ {
+ return array(
+ array('empty', array(), ''),
+ array('allowed', array(), 'foobar@example.com'),
+ array('valid_complex', array(), "'%$~test@example.com"),
+ array('invalid', array('EMAIL_INVALID'), 'fööbar@example.com'),
+ array('taken', array('EMAIL_TAKEN'), 'admin@example.com'),
+ array('banned', array('EMAIL_BANNED'), 'banned@example.com'),
+ );
+ }
+
+ /**
+ * @dataProvider validate_user_email_data
+ */
+ public function test_validate_user_email($case, $errors, $email)
+ {
+ $this->set_validation_prerequisites(false);
+
+ $this->helper->assert_valid_data(array(
+ $case => array(
+ $errors,
+ $email,
+ array('user_email'),
+ ),
+ ));
+ }
+
+ public static function validate_user_email_mx_data()
+ {
+ return array(
+ array('valid', array(), 'foobar@phpbb.com'),
+ array('no_mx', array('DOMAIN_NO_MX_RECORD'), 'test@does-not-exist.phpbb.com'),
+ );
+ }
+
+ /**
+ * @dataProvider validate_user_email_mx_data
+ * @group slow
+ */
+ public function test_validate_user_email_mx($case, $errors, $email)
+ {
+ $this->set_validation_prerequisites(true);
+
+ $this->helper->assert_valid_data(array(
+ $case => array(
+ $errors,
+ $email,
+ array('user_email'),
+ ),
+ ));
+ }
+}
diff --git a/tests/functions/validate_username_test.php b/tests/functions/validate_username_test.php
index 0819974e54..dc9f685f04 100644
--- a/tests/functions/validate_username_test.php
+++ b/tests/functions/validate_username_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions/validate_with_method_test.php b/tests/functions/validate_with_method_test.php
index 86d7b9571c..37e05d412a 100644
--- a/tests/functions/validate_with_method_test.php
+++ b/tests/functions/validate_with_method_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_acp/build_cfg_template_test.php b/tests/functions_acp/build_cfg_template_test.php
index 7f8db799c5..8ae78b97db 100644
--- a/tests/functions_acp/build_cfg_template_test.php
+++ b/tests/functions_acp/build_cfg_template_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_acp/build_select_test.php b/tests/functions_acp/build_select_test.php
index c44fd97ec3..ebdc58fd64 100644
--- a/tests/functions_acp/build_select_test.php
+++ b/tests/functions_acp/build_select_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_acp/h_radio_test.php b/tests/functions_acp/h_radio_test.php
index 4c1872d341..5ae4e91ea2 100644
--- a/tests/functions_acp/h_radio_test.php
+++ b/tests/functions_acp/h_radio_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php
index acc98fbf0d..3c9af4a889 100644
--- a/tests/functions_acp/validate_config_vars_test.php
+++ b/tests/functions_acp/validate_config_vars_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_acp/validate_range_test.php b/tests/functions_acp/validate_range_test.php
index cb028d4d07..6408e29a26 100644
--- a/tests/functions_acp/validate_range_test.php
+++ b/tests/functions_acp/validate_range_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_content/get_username_string_test.php b/tests/functions_content/get_username_string_test.php
index 1f23f19056..502796d1df 100644
--- a/tests/functions_content/get_username_string_test.php
+++ b/tests/functions_content/get_username_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_content/phpbb_clean_search_string_test.php b/tests/functions_content/phpbb_clean_search_string_test.php
index de642c9040..abd107097c 100644
--- a/tests/functions_content/phpbb_clean_search_string_test.php
+++ b/tests/functions_content/phpbb_clean_search_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php b/tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php
index d4881daf7e..150b091ceb 100644
--- a/tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php
+++ b/tests/functions_database_helper/update_rows_avoiding_duplicates_notify_status_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_database_helper/update_rows_avoiding_duplicates_test.php b/tests/functions_database_helper/update_rows_avoiding_duplicates_test.php
index 2f01d29d15..0e27f129de 100644
--- a/tests/functions_database_helper/update_rows_avoiding_duplicates_test.php
+++ b/tests/functions_database_helper/update_rows_avoiding_duplicates_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_install/ignore_new_file_on_update_test.php b/tests/functions_install/ignore_new_file_on_update_test.php
index 703da4e435..822c5e6789 100644
--- a/tests/functions_install/ignore_new_file_on_update_test.php
+++ b/tests/functions_install/ignore_new_file_on_update_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/functions_user/group_user_attributes_test.php b/tests/functions_user/group_user_attributes_test.php
index 86e4767970..99a15b32bf 100644
--- a/tests/functions_user/group_user_attributes_test.php
+++ b/tests/functions_user/group_user_attributes_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/groupposition/legend_test.php b/tests/groupposition/legend_test.php
index ac54a86b8e..4bad598a31 100644
--- a/tests/groupposition/legend_test.php
+++ b/tests/groupposition/legend_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/groupposition/teampage_test.php b/tests/groupposition/teampage_test.php
index ec89f56775..dbdeb35e9f 100644
--- a/tests/groupposition/teampage_test.php
+++ b/tests/groupposition/teampage_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/lint_test.php b/tests/lint_test.php
index b0149063bd..9fb1c7624c 100644
--- a/tests/lint_test.php
+++ b/tests/lint_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/lock/db_test.php b/tests/lock/db_test.php
index da689b7fa3..6fc813cb38 100644
--- a/tests/lock/db_test.php
+++ b/tests/lock/db_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/lock/flock_test.php b/tests/lock/flock_test.php
index 5e5ac5aa78..0ff38b6cc8 100644
--- a/tests/lock/flock_test.php
+++ b/tests/lock/flock_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/log/add_test.php b/tests/log/add_test.php
index 032546f002..d7e3760f0f 100644
--- a/tests/log/add_test.php
+++ b/tests/log/add_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/log/delete_test.php b/tests/log/delete_test.php
new file mode 100644
index 0000000000..b8be15efa5
--- /dev/null
+++ b/tests/log/delete_test.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_log_delete_test extends phpbb_database_test_case
+{
+ protected $log;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/delete_log.xml');
+ }
+
+ protected function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $db, $phpbb_dispatcher, $auth;
+
+ $db = $this->new_dbal();
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $user->data['user_id'] = 1;
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $this->log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ parent::setUp();
+ }
+
+ public function log_delete_data()
+ {
+ return array(
+ array(
+ array(1, 2),
+ array(16),
+ array(),
+ 'admin',
+ false,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 'l.log_id ASC',
+ '',
+ ),
+ array(
+ array(11),
+ array(),
+ array('keywords' => 'guest'),
+ 'mod',
+ false,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 'l.log_id ASC',
+ 'guest',
+ ),
+ array(
+ array(4, 5, 7),
+ array(),
+ array('forum_id' => 12, 'user_id' => 1),
+ 'mod',
+ false,
+ 0,
+ 0,
+ 12,
+ 0,
+ 1,
+ 0,
+ 'l.log_id ASC',
+ '',
+ ),
+ array(
+ array(12, 13),
+ array(),
+ array('forum_id' => array('IN' => array(14, 13))),
+ 'mod',
+ false,
+ 0,
+ 0,
+ array(13, 14),
+ 0,
+ 0,
+ 0,
+ 'l.log_id ASC',
+ '',
+ ),
+ array(
+ array(3, 14, 15),
+ array(3),
+ array('user_id' => array('>', 1)),
+ 'critical',
+ false,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 'l.log_id ASC',
+ '',
+ ),
+ array(
+ array(3, 14, 15),
+ array(),
+ array('keywords' => ''),
+ 'critical',
+ false,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 'l.log_id ASC',
+ '',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider log_delete_data
+ */
+ public function test_log_delete($expected_before, $expected_after, $delete_conditions, $mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by, $keywords)
+ {
+ $this->assertSame($expected_before, $this->get_ids($this->log->get_logs($mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by, $keywords)), 'before');
+ $this->log->delete($mode, $delete_conditions);
+ $this->assertSame($expected_after, $this->get_ids($this->log->get_logs($mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by, $keywords)), 'after');
+ }
+
+ public function get_ids($logs)
+ {
+ $ids = array();
+ foreach ($logs as $log_entry)
+ {
+ $ids[] = (int) $log_entry['id'];
+ }
+ return $ids;
+ }
+}
diff --git a/tests/log/fixtures/delete_log.xml b/tests/log/fixtures/delete_log.xml
new file mode 100644
index 0000000000..4b2402102e
--- /dev/null
+++ b/tests/log/fixtures/delete_log.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_log">
+ <column>log_id</column>
+ <column>log_type</column>
+ <column>user_id</column>
+ <column>forum_id</column>
+ <column>topic_id</column>
+ <column>reportee_id</column>
+ <column>log_ip</column>
+ <column>log_time</column>
+ <column>log_operation</column>
+ <column>log_data</column>
+ <row>
+ <value>1</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_INSTALL_INSTALLED</value>
+ <value>a:1:{i:0;s:9:"3.1.0-dev";}</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_KEY_NOT_EXISTS</value>
+ <value>a:1:{i:0;s:15:"additional_data";}</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_CRITICAL</value>
+ <value>a:1:{i:0;s:13:"critical data";}</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>34</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>45</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>1</value>
+ <value>1</value>
+ <value>23</value>
+ <value>56</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>45</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD2</value>
+ <value></value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>2</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_USER</value>
+ <value>a:1:{i:0;s:5:"admin";}</value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_USER</value>
+ <value>a:1:{i:0;s:5:"guest";}</value>
+ </row>
+ <row>
+ <value>10</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_SINGULAR_PLURAL</value>
+ <value>a:1:{i:0;i:2;}</value>
+ </row>
+ <row>
+ <value>11</value>
+ <value>1</value>
+ <value>1</value>
+ <value>15</value>
+ <value>3</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD3</value>
+ <value>a:1:{i:0;s:5:"guest";}</value>
+ </row>
+ <row>
+ <value>12</value>
+ <value>1</value>
+ <value>1</value>
+ <value>13</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>13</value>
+ <value>1</value>
+ <value>1</value>
+ <value>14</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>14</value>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>15</value>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>Anonymous</value>
+ <value>Anonymous</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>admin</value>
+ <value>admin</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>34</value>
+ <value>12</value>
+ </row>
+ <row>
+ <value>45</value>
+ <value>12</value>
+ </row>
+ <row>
+ <value>56</value>
+ <value>23</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/log/function_add_log_test.php b/tests/log/function_add_log_test.php
index e1bcd4acaf..99d412537c 100644
--- a/tests/log/function_add_log_test.php
+++ b/tests/log/function_add_log_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php
index 542d0adf9d..b7e60c7393 100644
--- a/tests/log/function_view_log_test.php
+++ b/tests/log/function_view_log_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/migrator/convert_timezones_test.php b/tests/migrator/convert_timezones_test.php
index a1eed1dbdf..7501ed2ed0 100644
--- a/tests/migrator/convert_timezones_test.php
+++ b/tests/migrator/convert_timezones_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/migrator/get_schema_steps_test.php b/tests/migrator/get_schema_steps_test.php
index 226535754e..3d15d2b200 100644
--- a/tests/migrator/get_schema_steps_test.php
+++ b/tests/migrator/get_schema_steps_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/migrator/schema_generator_test.php b/tests/migrator/schema_generator_test.php
index 4bac447229..9adf518a5d 100644
--- a/tests/migrator/schema_generator_test.php
+++ b/tests/migrator/schema_generator_test.php
@@ -1,14 +1,29 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
-class schmema_generator_test extends phpbb_test_case
+require_once __DIR__ . '/../dbal/migration/dummy_order.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_0.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_1.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_2.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_3.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_4.php';
+require_once __DIR__ . '/../dbal/migration/dummy_order_5.php';
+
+class schema_generator_test extends phpbb_test_case
{
+ /** @var \phpbb\db\migration\schema_generator */
+ protected $generator;
+
public function setUp()
{
parent::setUp();
@@ -46,4 +61,78 @@ class schmema_generator_test extends phpbb_test_case
$this->assertArrayHasKey('phpbb_users', $this->generator->get_schema());
}
+
+ public function column_add_after_data()
+ {
+ return array(
+ array(
+ 'phpbb_dbal_migration_dummy_order_0',
+ array(
+ 'foobar1',
+ 'foobar2',
+ 'foobar3',
+ ),
+ ),
+ array(
+ 'phpbb_dbal_migration_dummy_order_1',
+ array(
+ 'foobar1',
+ 'foobar3',
+ 'foobar4',
+ ),
+ ),
+ array(
+ 'phpbb_dbal_migration_dummy_order_2',
+ array(
+ 'foobar1',
+ 'foobar3',
+ 'foobar5',
+ ),
+ ),
+ array(
+ 'phpbb_dbal_migration_dummy_order_3',
+ array(
+ 'foobar1',
+ 'foobar3',
+ 'foobar6',
+ ),
+ ),
+ array(
+ 'phpbb_dbal_migration_dummy_order_4',
+ array(
+ 'foobar1',
+ 'foobar3',
+ 'foobar7',
+ ),
+ ),
+ array(
+ 'phpbb_dbal_migration_dummy_order_5',
+ array(
+ 'foobar1',
+ 'foobar3',
+ 'foobar9',
+ 'foobar8',
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider column_add_after_data
+ */
+ public function test_column_add_after($migration, $expected)
+ {
+ $this->get_schema_generator(array(
+ 'phpbb_dbal_migration_dummy_order',
+ $migration,
+ ));
+
+ $tables = $this->generator->get_schema();
+
+ $this->assertEquals(
+ $expected,
+ array_keys($tables[$this->table_prefix . 'column_order_test1']['COLUMNS']),
+ 'The schema generator could not position the column correctly, using the "after" option in the migration script.'
+ );
+ }
}
diff --git a/tests/mimetype/guesser_test.php b/tests/mimetype/guesser_test.php
index 7c58340a7a..b74a9f236e 100644
--- a/tests/mimetype/guesser_test.php
+++ b/tests/mimetype/guesser_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mimetype/incorrect_guesser.php b/tests/mimetype/incorrect_guesser.php
index 3939826faa..f74617b7a7 100644
--- a/tests/mimetype/incorrect_guesser.php
+++ b/tests/mimetype/incorrect_guesser.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mimetype/null_guesser.php b/tests/mimetype/null_guesser.php
index 5316d3726f..836ff4196a 100644
--- a/tests/mimetype/null_guesser.php
+++ b/tests/mimetype/null_guesser.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/auth_provider.php b/tests/mock/auth_provider.php
index 734e682ee9..abf0e4fdfb 100644
--- a/tests/mock/auth_provider.php
+++ b/tests/mock/auth_provider.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* Mock auth provider class with basic functions to help test sessions.
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index 9e5914b934..5fa3d28147 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/container_builder.php b/tests/mock/container_builder.php
index 734d3e1741..297e3a65e6 100644
--- a/tests/mock/container_builder.php
+++ b/tests/mock/container_builder.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
use Symfony\Component\DependencyInjection\ContainerInterface;
diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php
index 01ac6494d0..9f70f8e96c 100644
--- a/tests/mock/controller_helper.php
+++ b/tests/mock/controller_helper.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/event_dispatcher.php b/tests/mock/event_dispatcher.php
index 8887b16163..613551bffd 100644
--- a/tests/mock/event_dispatcher.php
+++ b/tests/mock/event_dispatcher.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/extension_manager.php b/tests/mock/extension_manager.php
index 7049cbdc50..1a475f62e0 100644
--- a/tests/mock/extension_manager.php
+++ b/tests/mock/extension_manager.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/filespec.php b/tests/mock/filespec.php
index 9d2a5c84de..7ea750afbe 100644
--- a/tests/mock/filespec.php
+++ b/tests/mock/filespec.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* Mock filespec class with some basic values to help with testing the
diff --git a/tests/mock/filesystem_extension_manager.php b/tests/mock/filesystem_extension_manager.php
index c5a51bbb3f..fa1b1c06bc 100644
--- a/tests/mock/filesystem_extension_manager.php
+++ b/tests/mock/filesystem_extension_manager.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/fileupload.php b/tests/mock/fileupload.php
index cbcbf4a6ab..8cc4d77ea1 100644
--- a/tests/mock/fileupload.php
+++ b/tests/mock/fileupload.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
/**
* Mock fileupload class with some basic values to help with testing the
diff --git a/tests/mock/lang.php b/tests/mock/lang.php
index ac814b45db..bebbe5a29b 100644
--- a/tests/mock/lang.php
+++ b/tests/mock/lang.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/metadata_manager.php b/tests/mock/metadata_manager.php
index b6489acfa4..16900a0fc1 100644
--- a/tests/mock/metadata_manager.php
+++ b/tests/mock/metadata_manager.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/notification_manager.php b/tests/mock/notification_manager.php
index 47fe30730f..6a590bc0ca 100644
--- a/tests/mock/notification_manager.php
+++ b/tests/mock/notification_manager.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package notifications
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -17,7 +21,6 @@ if (!defined('IN_PHPBB'))
/**
* Notifications service class
-* @package notifications
*/
class phpbb_mock_notification_manager
{
diff --git a/tests/mock/notification_type_post.php b/tests/mock/notification_type_post.php
index 80f2afbae0..6d8f6dc504 100644
--- a/tests/mock/notification_type_post.php
+++ b/tests/mock/notification_type_post.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package notifications
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/notifications_auth.php b/tests/mock/notifications_auth.php
index 2d387d8c00..1106c3004f 100644
--- a/tests/mock/notifications_auth.php
+++ b/tests/mock/notifications_auth.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/null_cache.php b/tests/mock/null_cache.php
index 7bd33b441b..5b801adf11 100644
--- a/tests/mock/null_cache.php
+++ b/tests/mock/null_cache.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/request.php b/tests/mock/request.php
index 60ba725abd..89d5321a25 100644
--- a/tests/mock/request.php
+++ b/tests/mock/request.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/search.php b/tests/mock/search.php
index 6739719216..f30876b4da 100644
--- a/tests/mock/search.php
+++ b/tests/mock/search.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php
index a2a403727b..29dd2a5bff 100644
--- a/tests/mock/session_testable.php
+++ b/tests/mock/session_testable.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/sql_insert_buffer.php b/tests/mock/sql_insert_buffer.php
index aa7c54dddd..c751764d45 100644
--- a/tests/mock/sql_insert_buffer.php
+++ b/tests/mock/sql_insert_buffer.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/mock/user.php b/tests/mock/user.php
index e57e86ae2f..9888337a9e 100644
--- a/tests/mock/user.php
+++ b/tests/mock/user.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/network/checkdnsrr_test.php b/tests/network/checkdnsrr_test.php
index 1942a50f06..a3852b2656 100644
--- a/tests/network/checkdnsrr_test.php
+++ b/tests/network/checkdnsrr_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/network/ftp_fsock_pasv_epsv_test.php b/tests/network/ftp_fsock_pasv_epsv_test.php
index 22f17785b8..6ed9d61dc0 100644
--- a/tests/network/ftp_fsock_pasv_epsv_test.php
+++ b/tests/network/ftp_fsock_pasv_epsv_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/network/inet_ntop_pton_test.php b/tests/network/inet_ntop_pton_test.php
index a59c2103bd..fae40ad74e 100644
--- a/tests/network/inet_ntop_pton_test.php
+++ b/tests/network/inet_ntop_pton_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/network/ip_normalise_test.php b/tests/network/ip_normalise_test.php
index 28059f376a..1acfd4521d 100644
--- a/tests/network/ip_normalise_test.php
+++ b/tests/network/ip_normalise_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/base.php b/tests/notification/base.php
index f6333866c3..a66e5986fd 100644
--- a/tests/notification/base.php
+++ b/tests/notification/base.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php
index c692f40b57..32ab34c9bc 100644
--- a/tests/notification/convert_test.php
+++ b/tests/notification/convert_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
require_once dirname(__FILE__) . '/../mock/sql_insert_buffer.php';
diff --git a/tests/notification/ext/test/notification/type/test.php b/tests/notification/ext/test/notification/type/test.php
index cdb921ca3b..b02a563f06 100644
--- a/tests/notification/ext/test/notification/type/test.php
+++ b/tests/notification/ext/test/notification/type/test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package notifications
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
index b812fff8f8..14ed4ff62c 100644
--- a/tests/notification/group_request_test.php
+++ b/tests/notification/group_request_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/manager_helper.php b/tests/notification/manager_helper.php
index 731dd00b7a..24030f5775 100644
--- a/tests/notification/manager_helper.php
+++ b/tests/notification/manager_helper.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package notifications
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -17,7 +21,6 @@ if (!defined('IN_PHPBB'))
/**
* Notifications service class
-* @package notifications
*/
class phpbb_notification_manager_helper extends \phpbb\notification\manager
{
diff --git a/tests/notification/notification_test.php b/tests/notification/notification_test.php
index e1788e8670..799dcc5e22 100644
--- a/tests/notification/notification_test.php
+++ b/tests/notification/notification_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php
index fbfd034381..c22c4c5ad2 100644
--- a/tests/notification/submit_post_base.php
+++ b/tests/notification/submit_post_base.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_type_bookmark_test.php b/tests/notification/submit_post_type_bookmark_test.php
index 4e4a3f6c9a..6d7747c2ba 100644
--- a/tests/notification/submit_post_type_bookmark_test.php
+++ b/tests/notification/submit_post_type_bookmark_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_type_post_in_queue_test.php b/tests/notification/submit_post_type_post_in_queue_test.php
index 6a7ac44e39..6bd9c8c93f 100644
--- a/tests/notification/submit_post_type_post_in_queue_test.php
+++ b/tests/notification/submit_post_type_post_in_queue_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_type_post_test.php b/tests/notification/submit_post_type_post_test.php
index c2eb419522..5007424690 100644
--- a/tests/notification/submit_post_type_post_test.php
+++ b/tests/notification/submit_post_type_post_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php
index 9956f3b58e..94979fd154 100644
--- a/tests/notification/submit_post_type_quote_test.php
+++ b/tests/notification/submit_post_type_quote_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/submit_post_type_topic_test.php b/tests/notification/submit_post_type_topic_test.php
index 29f67c9c78..52e9353c7c 100644
--- a/tests/notification/submit_post_type_topic_test.php
+++ b/tests/notification/submit_post_type_topic_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php
index a8422f80b5..7e0add2bb5 100644
--- a/tests/notification/user_list_trim_test.php
+++ b/tests/notification/user_list_trim_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index f7a02dc419..e233264cc6 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php
index df1474419b..c2104b0858 100644
--- a/tests/passwords/drivers_test.php
+++ b/tests/passwords/drivers_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index 561c4d1189..f9244d59f2 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php
index 724f26956c..a3ad901379 100644
--- a/tests/path_helper/path_helper_test.php
+++ b/tests/path_helper/path_helper_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/privmsgs/delete_user_pms_test.php b/tests/privmsgs/delete_user_pms_test.php
index 92ee7c5f2a..0f061e9784 100644
--- a/tests/privmsgs/delete_user_pms_test.php
+++ b/tests/privmsgs/delete_user_pms_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/profile/custom_string_test.php b/tests/profile/custom_string_test.php
index bd0b20573c..9e45d05ae3 100644
--- a/tests/profile/custom_string_test.php
+++ b/tests/profile/custom_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/profile/custom_test.php b/tests/profile/custom_test.php
index e68f1f7c4b..8570e8e6ee 100644
--- a/tests/profile/custom_test.php
+++ b/tests/profile/custom_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/profile/get_profile_value_test.php b/tests/profile/get_profile_value_test.php
index e867455a03..7a4a4ab5c2 100644
--- a/tests/profile/get_profile_value_test.php
+++ b/tests/profile/get_profile_value_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/random/gen_rand_string_test.php b/tests/random/gen_rand_string_test.php
index 3317c78ed9..1d12d0622c 100644
--- a/tests/random/gen_rand_string_test.php
+++ b/tests/random/gen_rand_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php
index 5929092e07..50c6778c8c 100644
--- a/tests/regex/censor_test.php
+++ b/tests/regex/censor_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/email_test.php b/tests/regex/email_test.php
index b4ea5b23aa..ede35c49bc 100644
--- a/tests/regex/email_test.php
+++ b/tests/regex/email_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/ipv4_test.php b/tests/regex/ipv4_test.php
index 38a3aa4a8e..62c2567517 100644
--- a/tests/regex/ipv4_test.php
+++ b/tests/regex/ipv4_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/ipv6_test.php b/tests/regex/ipv6_test.php
index d24217b346..41039c819d 100644
--- a/tests/regex/ipv6_test.php
+++ b/tests/regex/ipv6_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/password_complexity_test.php b/tests/regex/password_complexity_test.php
index e2aefdaac8..8a1a9edd41 100644
--- a/tests/regex/password_complexity_test.php
+++ b/tests/regex/password_complexity_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/table_prefix_test.php b/tests/regex/table_prefix_test.php
index 33bdd4ae2d..c593085b25 100644
--- a/tests/regex/table_prefix_test.php
+++ b/tests/regex/table_prefix_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/regex/url_test.php b/tests/regex/url_test.php
index b395f5cae2..d3487a9c16 100644
--- a/tests/regex/url_test.php
+++ b/tests/regex/url_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/request/deactivated_super_global_test.php b/tests/request/deactivated_super_global_test.php
index d28bd87eec..d45f9ca666 100644
--- a/tests/request/deactivated_super_global_test.php
+++ b/tests/request/deactivated_super_global_test.php
@@ -1,10 +1,13 @@
<?php
/**
*
-* @package testing
-* @version $Id$
-* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/request/request_test.php b/tests/request/request_test.php
index a25792e051..131abe6aac 100644
--- a/tests/request/request_test.php
+++ b/tests/request/request_test.php
@@ -1,10 +1,13 @@
<?php
/**
*
-* @package testing
-* @version $Id$
-* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php
index d126fe1e8b..67712eb6c8 100644
--- a/tests/request/request_var_test.php
+++ b/tests/request/request_var_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/request/type_cast_helper_test.php b/tests/request/type_cast_helper_test.php
index 98f4538c08..d6ee1dc728 100644
--- a/tests/request/type_cast_helper_test.php
+++ b/tests/request/type_cast_helper_test.php
@@ -1,10 +1,13 @@
<?php
/**
*
-* @package testing
-* @version $Id$
-* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/search/common_test_case.php b/tests/search/common_test_case.php
index 029637b00b..0bb4549832 100644
--- a/tests/search/common_test_case.php
+++ b/tests/search/common_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/search/mysql_test.php b/tests/search/mysql_test.php
index c08484c78d..c0c16456f4 100644
--- a/tests/search/mysql_test.php
+++ b/tests/search/mysql_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
index e860a4f89a..f681a62fce 100644
--- a/tests/search/native_test.php
+++ b/tests/search/native_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/search/postgres_test.php b/tests/search/postgres_test.php
index a59f5abc7d..f96d71e2bc 100644
--- a/tests/search/postgres_test.php
+++ b/tests/search/postgres_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/security/base.php b/tests/security/base.php
index 3ab2d1cfec..83d0649dfa 100644
--- a/tests/security/base.php
+++ b/tests/security/base.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php
index 1284aab94c..58dea68dc8 100644
--- a/tests/security/extract_current_page_test.php
+++ b/tests/security/extract_current_page_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index 32aa234316..0494c55c6d 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index e5ff3b1541..fb1011cde0 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/session/append_sid_test.php b/tests/session/append_sid_test.php
index b9e9ac1aa9..2a1d94514f 100644
--- a/tests/session/append_sid_test.php
+++ b/tests/session/append_sid_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/session/check_ban_test.php b/tests/session/check_ban_test.php
index 3f13b9f216..561b7faf49 100644
--- a/tests/session/check_ban_test.php
+++ b/tests/session/check_ban_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/check_isvalid_test.php b/tests/session/check_isvalid_test.php
index 760e2a6f24..90554bfe5f 100644
--- a/tests/session/check_isvalid_test.php
+++ b/tests/session/check_isvalid_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/session/create_test.php b/tests/session/create_test.php
index 442445599b..105c76eb7f 100644
--- a/tests/session/create_test.php
+++ b/tests/session/create_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/extract_hostname_test.php b/tests/session/extract_hostname_test.php
index bd183fd438..3a9d498007 100644
--- a/tests/session/extract_hostname_test.php
+++ b/tests/session/extract_hostname_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php
index 6e137e28b8..f314d35f87 100644
--- a/tests/session/extract_page_test.php
+++ b/tests/session/extract_page_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php
index e7d01785dd..0fbc71dcd7 100644
--- a/tests/session/garbage_collection_test.php
+++ b/tests/session/garbage_collection_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/session_key_test.php b/tests/session/session_key_test.php
index 1cf2101385..31a470615c 100644
--- a/tests/session/session_key_test.php
+++ b/tests/session/session_key_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/testable_facade.php b/tests/session/testable_facade.php
index 2600a46cc4..05858c8a63 100644
--- a/tests/session/testable_facade.php
+++ b/tests/session/testable_facade.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/testable_factory.php';
require_once dirname(__FILE__) . '/../../phpBB/phpbb/session.php';
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index c968012edf..81724cf661 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/session/unset_admin_test.php b/tests/session/unset_admin_test.php
index 1d5b1759ab..9633d77be6 100644
--- a/tests/session/unset_admin_test.php
+++ b/tests/session/unset_admin_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/session/validate_referrer_test.php b/tests/session/validate_referrer_test.php
index a302229287..7690a89018 100644
--- a/tests/session/validate_referrer_test.php
+++ b/tests/session/validate_referrer_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php
index a0dd8368cf..fdddbef4f2 100644
--- a/tests/template/includephp_test.php
+++ b/tests/template/includephp_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/subdir/includephp_from_subdir_test.php b/tests/template/subdir/includephp_from_subdir_test.php
index 6f9bc1efa6..08ffb0f7dc 100644
--- a/tests/template/subdir/includephp_from_subdir_test.php
+++ b/tests/template/subdir/includephp_from_subdir_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php
index 866d42d831..ce3c90b78a 100644
--- a/tests/template/template_events_test.php
+++ b/tests/template/template_events_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php
index 9ed8bd0947..ab91dd7a49 100644
--- a/tests/template/template_includecss_test.php
+++ b/tests/template/template_includecss_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php
index b20d068a64..232f551b4a 100644
--- a/tests/template/template_includejs_test.php
+++ b/tests/template/template_includejs_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
index cc71ff99e0..4d918b3167 100644
--- a/tests/template/template_inheritance_test.php
+++ b/tests/template/template_inheritance_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_parser_test.php b/tests/template/template_parser_test.php
index c200770adf..d32fe78391 100644
--- a/tests/template/template_parser_test.php
+++ b/tests/template/template_parser_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 0d19e7afd1..4f5b7629d5 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index c75b1e5065..00b823b2c4 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php
index e614c42d73..4f778a9c1c 100644
--- a/tests/template/template_test_case_with_tree.php
+++ b/tests/template/template_test_case_with_tree.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php b/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php
index ec59fa3886..22d55b4ed5 100644
--- a/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php
+++ b/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index aacdb1bef4..60ac68e7b8 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 796a6e57cf..b73b05025e 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 3759097319..182ffaaaf7 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
use Symfony\Component\BrowserKit\CookieJar;
@@ -199,12 +203,14 @@ class phpbb_functional_test_case extends phpbb_test_case
);
$container = new phpbb_mock_container_builder();
$container->set('migrator', $migrator);
+ $user = new \phpbb\user();
$extension_manager = new \phpbb\extension\manager(
$container,
$db,
$config,
new phpbb\filesystem(),
+ $user,
self::$config['table_prefix'] . 'ext',
dirname(__FILE__) . '/',
$phpEx,
diff --git a/tests/test_framework/phpbb_search_test_case.php b/tests/test_framework/phpbb_search_test_case.php
index b929e740ea..b37ed1d039 100644
--- a/tests/test_framework/phpbb_search_test_case.php
+++ b/tests/test_framework/phpbb_search_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php
index 0a2f767845..8a5d582573 100644
--- a/tests/test_framework/phpbb_session_test_case.php
+++ b/tests/test_framework/phpbb_session_test_case.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2013 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once dirname(__FILE__) . '/../session/testable_factory.php';
require_once dirname(__FILE__) . '/../session/testable_facade.php';
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index 8b16f02638..c39f7835d1 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index aba63a0498..a29b6e1955 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/text_processing/censor_text_test.php b/tests/text_processing/censor_text_test.php
index 043d8eb27d..983a5ba2d3 100644
--- a/tests/text_processing/censor_text_test.php
+++ b/tests/text_processing/censor_text_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php
index 15905535ac..057416da33 100644
--- a/tests/text_processing/generate_text_for_display_test.php
+++ b/tests/text_processing/generate_text_for_display_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/text_processing/make_clickable_test.php b/tests/text_processing/make_clickable_test.php
index d94fac2ae4..2c78391453 100644
--- a/tests/text_processing/make_clickable_test.php
+++ b/tests/text_processing/make_clickable_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php
index ce03c1fc21..449b2e5ca8 100644
--- a/tests/tree/nestedset_forum_base.php
+++ b/tests/tree/nestedset_forum_base.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_get_data_test.php b/tests/tree/nestedset_forum_get_data_test.php
index a0d0778e82..48fbabdb8c 100644
--- a/tests/tree/nestedset_forum_get_data_test.php
+++ b/tests/tree/nestedset_forum_get_data_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_insert_delete_test.php b/tests/tree/nestedset_forum_insert_delete_test.php
index d0e9e02c2e..6393752010 100644
--- a/tests/tree/nestedset_forum_insert_delete_test.php
+++ b/tests/tree/nestedset_forum_insert_delete_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_move_test.php b/tests/tree/nestedset_forum_move_test.php
index fe506c8278..108faf5b71 100644
--- a/tests/tree/nestedset_forum_move_test.php
+++ b/tests/tree/nestedset_forum_move_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_regenerate_test.php b/tests/tree/nestedset_forum_regenerate_test.php
index 38338dbc4d..914cc5f749 100644
--- a/tests/tree/nestedset_forum_regenerate_test.php
+++ b/tests/tree/nestedset_forum_regenerate_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/tree/nestedset_forum_test.php b/tests/tree/nestedset_forum_test.php
index 516c794ffc..7ccdc0a9b5 100644
--- a/tests/tree/nestedset_forum_test.php
+++ b/tests/tree/nestedset_forum_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package tree
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index 2d46fd4058..5e333213f4 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once __DIR__ . '/../../phpBB/includes/functions.php';
require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php
index 8b9df33a63..fcfb84125d 100644
--- a/tests/upload/fileupload_test.php
+++ b/tests/upload/fileupload_test.php
@@ -1,11 +1,15 @@
<?php
/**
- *
- * @package testing
- * @copyright (c) 2012 phpBB Group
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
- *
- */
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
require_once __DIR__ . '/../../phpBB/includes/functions.php';
require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
@@ -103,6 +107,31 @@ class phpbb_fileupload_test extends phpbb_test_case
unlink($this->path . 'jpg.jpg');
}
+ public function test_move_existent_file()
+ {
+ $upload = new fileupload('', array('jpg'), 1000);
+
+ copy($this->path . 'jpg', $this->path . 'jpg.jpg');
+ $file = $upload->local_upload($this->path . 'jpg.jpg');
+ $this->assertEquals(0, sizeof($file->error));
+ $this->assertFalse($file->move_file('../tests/upload/fixture'));
+ $this->assertFalse($file->file_moved);
+ $this->assertEquals(1, sizeof($file->error));
+ }
+
+ public function test_move_existent_file_overwrite()
+ {
+ $upload = new fileupload('', array('jpg'), 1000);
+
+ copy($this->path . 'jpg', $this->path . 'jpg.jpg');
+ copy($this->path . 'jpg', $this->path . 'copies/jpg.jpg');
+ $file = $upload->local_upload($this->path . 'jpg.jpg');
+ $this->assertEquals(0, sizeof($file->error));
+ $file->move_file('../tests/upload/fixture/copies', true);
+ $this->assertEquals(0, sizeof($file->error));
+ unlink($this->path . 'copies/jpg.jpg');
+ }
+
public function test_valid_dimensions()
{
$upload = new fileupload('', false, false, 1, 1, 100, 100);
diff --git a/tests/user/lang_test.php b/tests/user/lang_test.php
index 9cb9e320b3..45c6b04c65 100644
--- a/tests/user/lang_test.php
+++ b/tests/user/lang_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/user/user_loader_test.php b/tests/user/user_loader_test.php
index 13c35030f9..8d1f43707b 100644
--- a/tests/user/user_loader_test.php
+++ b/tests/user/user_loader_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/utf/normalizer_test.php b/tests/utf/normalizer_test.php
index 92230cfcc9..50eafda859 100644
--- a/tests/utf/normalizer_test.php
+++ b/tests/utf/normalizer_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php
index ae11e00fbd..2bb65387e0 100644
--- a/tests/utf/utf8_clean_string_test.php
+++ b/tests/utf/utf8_clean_string_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/utf/utf8_wordwrap_test.php b/tests/utf/utf8_wordwrap_test.php
index 39fdf73308..ab053e2911 100644
--- a/tests/utf/utf8_wordwrap_test.php
+++ b/tests/utf/utf8_wordwrap_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/version/version_fetch_test.php b/tests/version/version_fetch_test.php
index 7b3ba5e717..aa0ebaaa26 100644
--- a/tests/version/version_fetch_test.php
+++ b/tests/version/version_fetch_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/version/version_test.php b/tests/version/version_test.php
index 2e2398bd45..bc4f2c0294 100644
--- a/tests/version/version_test.php
+++ b/tests/version/version_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2014 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -181,6 +185,11 @@ class phpbb_version_helper_test extends phpbb_test_case
),
),
),
+ array(
+ '1.1.0',
+ array(),
+ array(),
+ ),
);
}
@@ -286,6 +295,11 @@ class phpbb_version_helper_test extends phpbb_test_case
),
'1.1.0-a2',
),
+ array(
+ '1.1.0',
+ array(),
+ null,
+ ),
);
}
diff --git a/tests/wrapper/gmgetdate_test.php b/tests/wrapper/gmgetdate_test.php
index 2f6c74b434..dc0e38544d 100644
--- a/tests/wrapper/gmgetdate_test.php
+++ b/tests/wrapper/gmgetdate_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/wrapper/mt_rand_test.php b/tests/wrapper/mt_rand_test.php
index eba0bf2faa..d190182286 100644
--- a/tests/wrapper/mt_rand_test.php
+++ b/tests/wrapper/mt_rand_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/wrapper/phpbb_php_ini_fake.php b/tests/wrapper/phpbb_php_ini_fake.php
index d9e96447e3..f218ff6d03 100644
--- a/tests/wrapper/phpbb_php_ini_fake.php
+++ b/tests/wrapper/phpbb_php_ini_fake.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/wrapper/phpbb_php_ini_test.php b/tests/wrapper/phpbb_php_ini_test.php
index 8e08d5c204..27c2487f0a 100644
--- a/tests/wrapper/phpbb_php_ini_test.php
+++ b/tests/wrapper/phpbb_php_ini_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
diff --git a/tests/wrapper/version_compare_test.php b/tests/wrapper/version_compare_test.php
index 8b42eb4bee..93d9e0117d 100644
--- a/tests/wrapper/version_compare_test.php
+++ b/tests/wrapper/version_compare_test.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/