1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

90 Commits

Author SHA1 Message Date
Joseph Warner
d204cdeee0 [ticket/11813] Change mock auth provider to implement base provider
PHPBB3-11813
2013-08-27 19:36:19 -04:00
Andy Chase
2fe2724e68 [ticket/11620] Whitespace and combine function into test_case
PHPBB3-11620
2013-07-22 17:39:45 -07:00
Andy Chase
e2a769ac79 Merge branch 'develop' into ticket/11620 2013-07-22 11:29:36 -07:00
asperous
30f198c61a [ticket/11620] Update auth_provider for new interface
PHPBB3-11620
2013-07-22 11:07:46 -07:00
asperous
d533e8807c [ticket/11620] Added a test for checking if users are banned
PHPBB3-11620
2013-07-22 11:07:41 -07:00
Nathan Guse
87795eba55 Merge pull request #1017 from nickvergessen/feature/softdelete-1-permission
Soft delete
2013-07-13 08:57:20 -07:00
Joas Schilling
1584fdd26d Merge remote-tracking branch 'EXreaction/ticket/11420' into develop
* EXreaction/ticket/11420:
  [ticket/11420] Fix tests
  [ticket/11420] Fix tests
  [ticket/11420] Fix tests
  [ticket/11420] Use !==, === when comparing strings
  [ticket/11420] Fix comments, license link
  [ticket/11420] Rename migrations file to something more helpful
  [ticket/11420] Forgot to include mock sql_insert_buffer
  [ticket/11420] Fix notification options conversion
2013-07-13 11:15:53 -04:00
Joas Schilling
bdb7ec0ceb Merge remote-tracking branch 'phpbb/develop' into feature/softdelete-1-permission
* phpbb/develop: (704 commits)
  [ticket/11630] Improvements to the PHP lint pre-commit hook
  [feature/auth-refactor] Move auth providers to separate directory
  [ticket/11619] Use HTTP/1.0 because of lack of chunked-encoding handling.
  [ticket/11619] Some tests for get_remote_file().
  [ticket/11617] Remove spaces and tabs from empty lines
  [ticket/11617] Missing U_ACTION in acp_captcha.php
  [feature/auth-refactor] Fix code style issue
  [feature/auth-refactor] Fix comment grammar
  [feature/auth-refactor] Fix the actual cause of test failures
  [ticket/10838] Fix URL for wiki and remove irrelevant line
  [ticket/10838] Remove php 5.4 and builtin server references
  [ticket/10838] Fix missing data
  [ticket/10838] separate database used mentioned in unit tests
  [ticket/11585] Make $auth_admin class property
  [feature/auth-refactor] A possible fix for the functional test failures
  [ticket/11566] Subsilver template error displayed after table headers
  [ticket/11566] Remove extra pair of brackets from conditional statement
  [ticket/11566] Check that guest doesn't have reporting permission by default
  [ticket/11566] Add captcha to report post template in subsilver
  [ticket/11566] Use the new constant CONFIRM_REPORT for captcha init
  ...

Conflicts:
	phpBB/docs/sphinx.sample.conf
	phpBB/feed.php
	phpBB/styles/prosilver/template/search_results.html
	phpBB/styles/prosilver/template/viewforum_body.html
2013-07-11 11:41:48 +02:00
Andy Chase
c96b0b1a47 [ticket/11620] Removed unnecessary lines and whitespace
PHPBB3-11620
2013-07-09 12:03:17 -07:00
Andy Chase
f51721e905 [ticket/11620] Rename provider -> mock_auth_provider
Rename the class and file name to better match
what the class is mocking, as well as implement the
interface of that class.

PHPBB3-11620
2013-07-08 16:38:53 -07:00
Andy Chase
3999d7ec7c [ticket/11620] More mock provider methods
The mock provider object now better matches the interface
given for providers.

PHPBB3-11620
2013-07-08 10:28:40 -07:00
Andy Chase
a1168972ff [ticket/11620] Added validate_session to provider.
PHPBB3-11620
2013-07-05 15:00:05 -07:00
Andy Chase
5cdcb689df [ticket/11620] Implemented a provider mock object.
Due to an auth_refactor, there is a new dependency
in session.php on phpbb_container and a provider.

For purposes of testing, implemented a simple one.

PHPBB3-11620
2013-07-05 14:49:30 -07:00
Andreas Fischer
b4183eda0c Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11579] Add method for validating emails for valid MX and mark as slow
  [ticket/11579] Do not extend validate_data_helper
  [ticket/11579] Add missing commas to validate_username_test
  [ticket/11579] Rework calls to validate_data_helper
  [ticket/11579] Move simple tests into seperate files
  [ticket/11579] Use test case helper class and use assert prefix for method
  [ticket/11579] Move tests into seperate files depending on needed fixture
  [ticket/11579] Remove unnecessary globals from validate_password()
  [ticket/11579] Add remaining unit tests for validate_data functions
  [ticket/11579] Add basic set of unit tests for validate_data()

Conflicts:
	tests/mock/cache.php
2013-06-11 18:46:30 +02:00
Joas Schilling
d406dd99d8 [ticket/develop/11543] Use plurals in develop
PHPBB3-11543
2013-06-06 23:29:50 +02:00
Marc Alexander
3f657bc63e [ticket/11579] Add remaining unit tests for validate_data functions
This now includes tests for usernames, passwords, emails, and jabber
addresses. A few small changes had to be applied to phpbb_mock_cache
and phpbb_mock_user in order to incorporate needed methods.

PHPBB3-11579
2013-05-30 16:05:19 +02:00
David King
fedd9d18d2 Merge remote-tracking branch 'EXreaction/ticket/11413' into develop
* EXreaction/ticket/11413: (23 commits)
  [ticket/11413] Revert some cache service related changes from earlier
  [ticket/11413] Use phpbb_user in test
  [ticket/11413] $user should have been $this->user
  [ticket/11413] Fix unit tests
  [ticket/11413] Translate the error
  [ticket/11413] Rename file to something more helpful
  [ticket/11413] Remove remaining irrelevant code to this PR
  [ticket/11413] Remove mock sql_insert_buffer.php (not relevant to PR)
  [ticket/11413] Remove conversion of user_notifications
  [ticket/11413] Correct copyright year
  [ticket/11413] Remove changes for ticket 11420 from this branch
  [ticket/11413] Include mock class
  [ticket/11413] Don't use the database for the convert test
  [ticket/11413] Test get_notification_type_id and _ids functions
  [ticket/11413] Use sql_insert_buffer
  [ticket/11413] Create test for notification conversion
  [ticket/11413] Fix test fixtures and tests
  [ticket/11413] Fix some more tests
  [ticket/11413] Fix notification tests
  [ticket/11413] Prevent recursive function calls
  ...
2013-05-20 11:54:39 -04:00
Joas Schilling
65c407044e [ticket/11450] Move mocked class into mock/metadata_manager.php
PHPBB3-11450
2013-05-08 08:47:26 +02:00
Nathaniel Guse
77147b53c1 [ticket/11413] Remove mock sql_insert_buffer.php (not relevant to PR)
PHPBB3-11413
2013-05-03 08:38:00 -05:00
Nathaniel Guse
7743659563 [ticket/11420] Forgot to include mock sql_insert_buffer
PHPBB3-11420
2013-05-03 08:37:09 -05:00
Nathaniel Guse
9004676810 [ticket/11413] Include mock class
PHPBB3-11413
2013-04-30 22:02:10 -05:00
Nathaniel Guse
4cd0914f89 [ticket/11413] Fix notification tests
Send types/methods the cache service, not the driver (not sure why the
driver was sent before)

PHPBB3-11413
2013-04-29 22:16:46 -05:00
Nathan Guse
df518ac131 [ticket/11335] (tests) Make php_ext 'php' not '.php'
PHPBB3-11335
2013-04-24 17:45:51 -05:00
Joas Schilling
423b310e2a [ticket/11362] Extension manager depends on filesystem
PHPBB3-11362
2013-04-17 18:43:19 +02:00
Joas Schilling
42c062cedf Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/softdelete-1-permission
* 'develop' of https://github.com/phpbb/phpbb3: (480 commits)
  [ticket/6723] Show info that message has been deleted before delivery
  [ticket/11385] Fix issue with migration module tool not getting extension module info
  [ticket/11386] Fix failing tests from constructor changes
  [ticket/11386] Fix circular reference error & serialize error
  [ticket/11386] Remove tests that check if finder cache is working
  [ticket/11386] Forgot to get the migration classes
  [ticket/11386] Update tests with new constructors for ext.manager/migrator
  [ticket/11386] Use finder to find migration files
  [ticket/11363] Fix to make get_module_infos get from all extensions
  [ticket/11381] Make finder able to search in all available extensions
  [ticket/11103] Revert whitespace changes
  [ticket/11103] Few more minor language things
  [ticket/11103] Don't call generate_board_url many times
  [ticket/11103] Case time in queries as an int
  [ticket/11103] Fix effectively installed check
  [ticket/11103] Remove padding from notifications for now.
  [ticket/11363] Fix a couple bugs and throw errors if the file not found
  [ticket/11372] Migrator should only check if effectively installed if not
  [ticket/11363] Load module info files for extensions too
  [ticket/11103] Notifications Migration file
  ...

Conflicts:
	phpBB/includes/functions_posting.php
	phpBB/includes/mcp/mcp_queue.php
	phpBB/includes/search/fulltext_mysql.php
	phpBB/includes/search/fulltext_native.php
	phpBB/includes/search/fulltext_postgres.php
	phpBB/includes/search/fulltext_sphinx.php
	phpBB/install/database_update.php
	phpBB/styles/prosilver/template/ajax.js
2013-03-03 20:06:52 +01:00
Nathan Guse
07282a30ae [ticket/11103] Fix some various issues, better comments
PHPBB3-11103
2013-01-15 12:10:07 -06:00
Nathan Guse
51e0f002ee Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11103
# By Oleg Pudeyev (37) and others
# Via Oleg Pudeyev (24) and others
* 'develop' of github.com:phpbb/phpbb3: (179 commits)
  [ticket/11323] Add tests for inclusion of defined variables
  [ticket/11324] Add PHP 5.5 environment to travis and allow it to fail.
  [ticket/11321] Recreate schema files with develop/create_schema_files.php
  [ticket/11320] Include functions file as we need phpbb_convert_30_dbms_to_31
  [ticket/11313] Use correct object el instead of eel in alt_text callback
  [ticket/11301] Guidelines: Add spaces in front and after the / operator.
  [ticket/11301] Explicitly cast str offset to int to prevent E_NOTICE on 5.4.
  [ticket/11311] Include asset core.js in subsilver2 overall_footer.html
  [ticket/10949] Remove not needed comma
  [ticket/11309] phpbb_extension_interface::disable_step correct docblock.
  [ticket/10949] Converted missing code to new JS coding guidelines
  [ticket/11302] Correctly select first timezone or selected timezone
  [ticket/11305] Mock container for cache driver in functional create_user()
  [ticket/11305] Check for $cache being null before using it in db drivers.
  [ticket/10805] Compare phpbbAlertTimer against null
  [ticket/11305] Define hook finder as a service on the container.
  [ticket/11305] Adjust comment.
  [ticket/11305] Use phpbb_create_default_container.
  [ticket/11305] Create a normal container during final installation step.
  [ticket/11305] Retrieve cache driver from container rather than cache service.
  ...

Conflicts:
	phpBB/install/schemas/firebird_schema.sql
	phpBB/install/schemas/mssql_schema.sql
	phpBB/install/schemas/mysql_40_schema.sql
	phpBB/install/schemas/mysql_41_schema.sql
	phpBB/install/schemas/oracle_schema.sql
	phpBB/install/schemas/postgres_schema.sql
	phpBB/install/schemas/sqlite_schema.sql
	phpBB/styles/subsilver2/template/overall_footer.html
2013-01-15 11:31:39 -06:00
Joas Schilling
e34b8ed094 Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/softdelete-1-permission-rebase
* 'develop' of https://github.com/phpbb/phpbb3: (544 commits)
  [feature/events] Fix improperly named event in documentation
  [feature/events] Fix alphabetization of events
  [feature/events] Put events in alphabetical order
  [feature/events] Make EVENTS.md lowercase
  [ticket/11285] Use more granularity in dependency checks in compress test
  [ticket/10880] The m_approve permisson no longer implies f_noapprove.
  [ticket/10803] Show failure message until user dismisses it
  [ticket/10954] Add missing semi-colon
  [ticket/10954] Make sure to mark subforums unread and add small fixes
  [feature/events] Use ` to escape HTML tags in markdown
  [feature/events] Remove HTML tags from markdown so they don't get parsed
  [ticket/10954] Miscellaneous coding fixes
  [feature/events] Remove extraneous space
  [feature/events] Add markdown template event documentation file
  [feature/events] forumlist_body_last_post_title_after -> _prepend (subsilver2)
  [feature/events] Fix overall_footer_end -> overall_footer_after (subsilver2)
  [feature/events] Fix typo in event name
  [ticket/10763] Use self when calling get_extension() in filespec class
  [feature/events] Fix more subsilver2 events
  [feature/events] Fix some subsilver2 events
  ...

Conflicts:
	phpBB/install/database_update.php
	phpBB/posting.php
2012-12-20 22:51:38 +01:00
Oleg Pudeyev
e50f69187f [ticket/11037] Eliminate global $db usage in cache drivers.
The only time $db is needed in cache drivers is to navigate the
result set in sql_save. Pass it as a parameter in that function.

PHPBB3-11037
2012-12-20 04:35:30 -05:00
Marc Alexander
54d96dfac7 [ticket/10763] Make functions for remote avatars static
fileupload::image_types() and filespec::get_extension() are called
statically while submitting the form for the remote avatar. Make them
static as described in the ticket in order to prevent a PHP notice.
Also change the tests to use the static functions.

PHPBB3-10763
2012-12-17 17:42:13 +01:00
Nathaniel Guse
7ae5b62fc6 Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11103 2012-12-12 16:30:50 -06:00
David King
a9db155c28 Merge remote-tracking branch 'p/feature/template-events' into develop
# By Oleg Pudeyev (36) and others
# Via Oleg Pudeyev
* p/feature/template-events: (47 commits)
  [feature/template-events] Pass arguments in correct order.
  [feature/template-events] Order extensions in mock extension manager.
  [feature/template-events] Changes per imkingdavid's review.
  [feature/template-events] Make style names private on template.
  [feature/template-events] Test for event that is defined in parent style only.
  [feature/template-events] Specify style names, add inheritance tests.
  [feature/template-events] Normalize expected directory trees.
  [feature/template-events] Allow dataset to be correctly selectable.
  [feature/template-events] Dataset for template event testing with inheritance.
  [feature/template-events] Use style names array in template filter.
  [feature/template-events] Generate style names array in set_style.
  [feature/template-events] Convert a single style name to array of them.
  [feature/template-events] Chase dependency injection for template context.
  [feature/template-events] Adjust template events test to use the dataset.
  [feature/template-events] Create a dataset for template event tests.
  [feature/template-events] Indentation fix.
  [feature/template-events] Cosmetic changes.
  [feature/template-events] Wording: wrongly -> improperly.
  [feature/template-events] Indentation fix.
  [feature/template-events] Rename template_name to style_name.
  ...
2012-12-10 14:09:10 -05:00
Oleg Pudeyev
eaa0319867 Merge PR #1125 branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10972] Drop user deletion.
  [ticket/10972] Tweak user addition.
  [ticket/10972] Add destroy method to mock cache.
  [ticket/10972] Add mock null cache.
  [ticket/10972] Backport get_db from develop.
  [ticket/10972] Added explicit checks for creating duplicate users.
  [ticket/10972] Moved tests into appropriate places and added comments
  [ticket/10972] Added methods for creating and deleting basic users

Conflicts:
	tests/mock/cache.php
	tests/test_framework/phpbb_functional_test_case.php
2012-12-10 06:25:51 -05:00
Nathan Guse
0042f07147 Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Conflicts:
	phpBB/install/database_update.php
	phpBB/styles/prosilver/template/ucp_prefs_personal.html
	phpBB/styles/subsilver2/template/ucp_prefs_personal.html
2012-12-07 21:14:39 -06:00
Oleg Pudeyev
1285bdff00 [ticket/10972] Add destroy method to mock cache.
I actually needed the version that destroys tables, therefore
I ended up writing a mock null cache. This code is currently unused
but will probably be handy at some point.

PHPBB3-10972
2012-12-06 23:42:13 -05:00
Oleg Pudeyev
771bb957ab [ticket/10972] Add mock null cache.
The mock cache has instrumentation methods and therefore is non-trivial
to implement. For those times when we don't care that the cache caches,
null cache is a simpler implementation.

PHPBB3-10972
2012-12-06 23:41:02 -05:00
Oleg Pudeyev
3a702084e4 Merge PR #974 branch 'bantu/ticket/10875' into develop
* bantu/ticket/10875:
  [ticket/10875] tests/cache/cache_test.php: Use single quotes where possible.
  [ticket/10875] Test for null cache driver and sql cache.
  [ticket/10875] Revise sql cache test.
  [ticket/10875] Must return query result on failure.
  [ticket/10875] More documentation.
  [ticket/10875] Spelling fix.
  [ticket/10875] Add docblocks for phpbb_cache_driver_interface
  [ticket/10875] Add comment about cache's sql_load() method.
  [ticket/10875] Fix logic in phpbb_cache_driver_file::sql_save().
  [ticket/10875] Fix phpbb_mock_cache::sql_save() to return $query_result.
  [ticket/10875] Fix return value of phpbb_cache_driver_null::sql_save().
  [ticket/10875] Remove useless assignment from phpbb_cache_driver_memory.
2012-11-30 20:44:51 -05:00
Oleg Pudeyev
29f7e729ed [feature/template-events] Order extensions in mock extension manager.
PHPBB3-9550
2012-11-27 11:11:50 -05:00
Nathan Guse
2afb8b9df8 [ticket/11103] Create user loader class, update for DIC
Create a very basic user loader class to handle querying/storing
user data in a centralized location.

Use DIC collection service for notification types/methods.

Cleanup unused dependencies.

Fix some other issues.

PHPBB3-11103
2012-11-20 22:54:16 -06:00
Oleg Pudeyev
0e6d12dfc4 [feature/template-events] Allow dataset to be correctly selectable.
PHPBB3-9550
2012-11-17 16:42:43 -05:00
Nathan Guse
d2187424da Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11103
Conflicts:
	phpBB/common.php
	phpBB/config/services.yml
2012-11-14 11:33:24 -06:00
Nils Adermann
69845585a2 Merge pull request #1056 from igorw/feature/compiled-dic
[feature/compiled-dic] Compile the DI Container into a cached class
2012-11-11 09:05:15 -08:00
Nathaniel Guse
84ba10ec8c Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103 2012-11-11 04:42:06 -06:00
Andreas Fischer
e86ecc0f3b Merge remote-tracking branch 'Fyorl/ticket/10939' into develop
* Fyorl/ticket/10939:
  [ticket/10939] Added documentation for phpbb_request::file
  [ticket/10939] Added tests for phpbb_request::file
  [ticket/10939] Modified the default return for $request->file
  [ticket/10939] Modified fileupload tests to deal with new behaviour
  [ticket/10939] Modified mock request class to handle deactivated $_FILES
  [ticket/10939] Modified acp_groups.php to not use $_FILES
  [ticket/10939] Modified ucp_groups.php to not use $_FILES
  [ticket/10939] Modified functions_user.php to not use $_FILES
  [ticket/10939] Modified message_parser.php to not use $_FILES
  [ticket/10939] Modified functions_upload to not use $_FILES
  [ticket/10939] Modified request test slightly to include $_FILES
  [ticket/10939] Added $_FILES handling to phpbb_request
2012-11-10 23:49:29 +01:00
David King
f48709f5bb [feature/compiled-dic] Compile the DI Container into a cached class
PHPBB3-11152
2012-11-10 11:40:09 +01:00
Andreas Fischer
59af4d68fc [ticket/10875] Fix phpbb_mock_cache::sql_save() to return $query_result.
PHPBB3-10875
2012-10-30 18:50:26 -04:00
Nathan Guse
e549b7663d [ticket/11103] Set basic notifications to be enabled by default
Now, if there is no row for the user in the user_notifications table,
the user will receive basic notifications. If the user wishes to not
receive notifications, a row must be added with notify = 0.

For other methods besides the basic (e.g. email, jabber) a row must
still be added with notify = 1 for them to receive notifications

PHPBB3-11103
2012-10-29 18:09:20 -05:00
Joas Schilling
b3d5f2b4e4 [feature/soft-delete] Fix unit tests for delete_posts()
PHPBB3-9567
2012-10-23 23:37:25 +02:00
Nathan Guse
bc18e368c3 [ticket/11103] Correct the test case
Fix a bug that broke it and make sure to set the needed config/auth settings

PHPBB3-11103
2012-10-20 21:55:58 -05:00
Nathan Guse
c7c3ab07c6 [ticket/11103] Brackets on their own lines
PHPBB3-11103
2012-10-18 19:24:08 -05:00