1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

164 Commits

Author SHA1 Message Date
Nathan Guse
71e07ecc47 [ticket/11320] Include functions file as we need phpbb_convert_30_dbms_to_31
PHPBB3-11320
2013-01-10 19:27:51 -06:00
Igor Wiedler
0483971f77 [ticket/11305] Mock container for cache driver in functional create_user()
create_user has calls to fetch the cache driver from the container. This
PR mocks the container and returns a null cache driver in that case.

PHPBB3-11305
2013-01-02 21:44:25 +01:00
Andreas Fischer
cb7f6deb07 Merge remote-tracking branch 'p/ticket/10758' into develop
* p/ticket/10758:
  [ticket/10758] Add return to the other compat function.
  [ticket/10758] Add periods.
  [ticket/10758] Yes, only one empty line.
  [ticket/10758] Add deprecated tags.
  [ticket/10758] Add compat functions.
  [ticket/10758] Admin is not working yet.
  [ticket/10758] Test moderator and admin permissions.
  [ticket/10758] Check that acl was changed in the test.
  [ticket/10758] Extract obtain_user_data for the benefit of tests.
  [ticket/10758] Functional test for changing a user's permission.
  [ticket/10758] Spelling fix.
  [ticket/10758] Add a test for acp login.
  [ticket/10758] Dependency inject parameters into update_foes.
  [ticket/10758] Dependency inject parameters into cache_moderators.
2012-12-25 15:18:47 +01:00
Oleg Pudeyev
b6f40f7c33 [ticket/10758-upload] Convert error to a failure.
PHPBB3-10758
2012-12-20 20:42:06 -05:00
Oleg Pudeyev
ff83580af1 [ticket/10758] Add a test for acp login.
PHPBB3-10758
2012-12-15 16:50:28 -05:00
Oleg Pudeyev
d1eb3449af [ticket/11268] Delete phpbb_db_driver_mysql4 as there is no such thing.
PHPBB3-11268
2012-12-14 14:05:46 -05:00
Oleg Pudeyev
1774dd2af4 [ticket/11015] Installer still needs 3.0-style dbms name.
PHPBB3-11015
2012-12-13 17:49:30 -05:00
Oleg Pudeyev
2d5ba0ebd7 Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop:
  [ticket/11262] Add .lock in cache directory to .gitignore
  [ticket/11265] Add assertions for board installation success.
  [ticket/11263] Fix PHP Notice: Undefined variable: extension_manager
  [ticket/10975] Add a test for viewing a profile.
  [ticket/10975] Test restricting by first character.
  [ticket/10975] Avoid rewriting global config twice.
  [ticket/10975] Test memberlist, not user creation.
  [ticket/10975] Some quick tests to check the memberlist behaviour
2012-12-13 17:43:57 -05:00
Andreas Fischer
93222cf396 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11265] Add assertions for board installation success.

Conflicts:
	tests/test_framework/phpbb_functional_test_case.php
2012-12-13 23:42:39 +01:00
Oleg Pudeyev
586e8cbd97 [ticket/11015] Include functions.php because it is not always included.
PHPBB3-11015
2012-12-13 15:46:13 -05:00
Oleg Pudeyev
789c04b900 [ticket/11265] Add assertions for board installation success.
PHPBB3-11265
2012-12-13 15:42:00 -05:00
Oleg Pudeyev
83345d986d [ticket/11015] Convert database drivers to new spelling in post setup sync.
PHPBB3-11015
2012-12-13 08:11:10 -05:00
Oleg Pudeyev
aae7a81270 Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (101 commits)
  [ticket/10491] Make recreate_database static.
  [ticket/11088] Pass required objects in as arguments
  [ticket/11088] Globalize objects in new permission function
  [ticket/11088] Move permission creation to a function
  [ticket/11088] Copy a_styles permission for a_extensions
  [ticket/11088] Remove extraneous word from sentence in comment
  [ticket/11088] Changed "file extensions" to "attachment extensions"
  [ticket/11088] Fix the database updater to correctly manipulate the modules
  [ticket/11088] Put language pack module move below extension module creation
  [ticket/11088] Untested, progress on update script
  [ticket/11088] Fix typo (period instead of comma)
  [ticket/11088] Untested progress for update script
  [ticket/11088] Added missing comma
  [ticket/11088] Removed added space
  [ticket/11088] Move style, extension and language pack management to customise
  [ticket/11243] Show download all link on all pages of topic with attachments
  [feature/template-events] Pass arguments in correct order.
  [feature/template-events] Pass arguments in correct order.
  [ticket/10491] Install board once per test run.
  [ticket/11257] Do not require set_name() method to exist
  ...
2012-12-13 07:56:40 -05:00
Oleg Pudeyev
4de07338ef [ticket/10975] Avoid rewriting global config twice.
PHPBB3-10975
2012-12-13 07:30:00 -05:00
Oleg Pudeyev
0916dc14ef Merge PR #1119 branch 'develop-olympus' into develop
While merging into develop, also move self::$config['table_prefix']
initialization into setup before class from install_board, as
install_board is only called to install the board and not for each test case.

* develop-olympus:
  [ticket/10491] Make recreate_database static.
  [ticket/10491] Install board once per test run.
  [ticket/10491] Move board installation into setup before class.
  [ticket/10491] Set up functional tests sensibly.

Conflicts:
	tests/test_framework/phpbb_functional_test_case.php
2012-12-13 03:39:47 -05:00
Oleg Pudeyev
a4e4841082 Merge PR #1119 branch 'p/ticket/10491' into develop-olympus
* p/ticket/10491:
  [ticket/10491] Make recreate_database static.
  [ticket/10491] Install board once per test run.
  [ticket/10491] Move board installation into setup before class.
  [ticket/10491] Set up functional tests sensibly.
2012-12-13 03:11:07 -05:00
Oleg Pudeyev
1441b70ae8 [ticket/10491] Make recreate_database static.
PHPBB3-10491
2012-12-12 21:47:48 -05:00
Oleg Pudeyev
2bc2cb1f6f [ticket/10491] Install board once per test run.
This is how things used to be. Installing for each test class brings
3-4x performance penalty compared to installing once for the entire
test run. However, with a single installation for all tests an
individual test can see different data when it is invoked by itself
vs when it is executed as part of the entire test suite.

PHPBB3-10491
2012-12-10 06:42:43 -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
Oleg Pudeyev
ff993ba9d3 [ticket/10972] Drop user deletion.
Users should not be deleted in tests that test user creation.
Tests should use unique user names to avoid collisions.

User deletion should use user_remove anyway.

PHPBB3-10972
2012-12-06 23:49:27 -05:00
Oleg Pudeyev
fb5c4440e5 [ticket/10972] Tweak user addition.
Always add users, do not keep track of which users have been added.
The tests should know whether users they want exist or not.

Use more unique user names in tests for robustness.

Added some more assertions here and there.

PHPBB3-10972
2012-12-06 23:45:17 -05:00
Oleg Pudeyev
ebdd96592a [ticket/10972] Backport get_db from develop.
PHPBB3-10972
2012-12-06 22:45:12 -05:00
Fyorl
d33accb687 [ticket/10972] Added explicit checks for creating duplicate users.
PHPBB3-10972
2012-12-06 22:10:10 -05:00
Fyorl
cafc7feca1 [ticket/10972] Moved tests into appropriate places and added comments
PHPBB3-10972
2012-12-06 22:10:09 -05:00
Fyorl
7005002069 [ticket/10972] Added methods for creating and deleting basic users
Modified the login method to allow logging in of an arbitrary user.
Also added tests for the new functionality.

PHPBB3-10972
2012-12-06 22:10:09 -05:00
Oleg Pudeyev
26fd70d9cd Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (196 commits)
  [ticket/11219] Coding guidelines and naming consistency changes
  [ticket/10841] Revert more whitespace changes.
  [ticket/10841] Revert whitespace changes.
  [ticket/10841] adding space after if
  [ticket/10841] removing unnecessary spacing
  [ticket/10841] changing affectedrows check to COUNT in sql
  [ticket/10841] Modifying style and language selectors in UCP
  [ticket/11247] Fix wrong property reference in flock class.
  [ticket/10602] Avoid a race condition.
  [ticket/10602] Use last_queue_run for its intended purpose.
  [ticket/10716] Collect standard error from executed php process.
  [ticket/10716] Skip test if php is not in PATH.
  [ticket/10716] Exclude our dependencies from linting.
  [ticket/10103] New and improved wording.
  [ticket/10716] Only lint on php 5.3+.
  [ticket/10103] Assert with messages.
  [ticket/10103] assertLessThan/assertGreaterThan.
  [ticket/10103] Inline assignment is bad?
  [ticket/10103] $rv had too few characters.
  [ticket/10103] Correct flock class documentation.
  ...

Conflicts:
	phpBB/includes/functions.php
	tests/cache/cache_test.php
2012-12-06 21:49:24 -05:00
Oleg Pudeyev
2364d4b217 Merge PR #1101 branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11219] Coding guidelines and naming consistency changes
  [ticket/11219] Only update sequences that are affected by a fixture
  [ticket/11219] Recreate Oracle sequences instead of altering them
  [ticket/11219] Add unit test for inserting into a sequence column
  [ticket/11219] Update sequence values after loading fixtures
2012-12-06 01:18:31 -05:00
Patrick Webster
dbb54b217b [ticket/11219] Coding guidelines and naming consistency changes
PHPBB3-11219
2012-12-05 22:57:06 -06:00
Oleg Pudeyev
38d2868ba8 [ticket/10491] Move board installation into setup before class.
Functional posting test already assumed that board is installed
once per test case and not once per test.

PHPBB3-10491
2012-12-04 17:37:46 -05:00
Oleg Pudeyev
bdc3ddf2bc [ticket/10491] Set up functional tests sensibly.
PHPBB_FUNCTIONAL_URL goes into setup before class.

Drop PHPBB_FUNCTIONAL_URL check in board installation and
silent return if it is not set.

Take board installation out of constructor.

Install board in setup method.

PHPBB3-10491
2012-12-04 17:19:25 -05:00
Oleg Pudeyev
74093d0fd3 [ticket/11015] Fix functional test case.
PHPBB3-11015
2012-12-04 04:32:37 -05:00
Oleg Pudeyev
7d09b9b4bb [ticket/9983] Add phpbb prefix to global variables.
PHPBB3-9983
2012-12-02 23:57:37 -05:00
Patrick Webster
720ef233b1 [ticket/11219] Only update sequences that are affected by a fixture
PHPBB3-11219
2012-12-01 22:34:03 -06:00
Oleg Pudeyev
c852044d6e [ticket/9983] Add redis cache driver tests.
In order to not overwrite data in default redis store, at least
one of redis host or post must be explicitly specified.

Redis cache driver constructor has been modified to accept
host and port as parameters. This was not added to public API
as there are more parameters being passed via global constants.

PHPBB3-9983
2012-12-01 00:48:21 -05:00
Oleg Pudeyev
4d1486b08c [ticket/11174] Eliminate search wrapper copy pasting.
PHPBB3-11174
2012-11-27 08:49:06 -05:00
Oleg Pudeyev
a5900a6b11 [ticket/11174] Extract phpbb_search_test_case.
PHPBB3-11174
2012-11-27 08:49:06 -05:00
Oleg Pudeyev
3ed4fc437e [ticket/11174] Move assertion definition to base class.
PHPBB3-11174
2012-11-27 08:49:06 -05:00
Patrick Webster
1dff6d1bf9 [ticket/11219] Recreate Oracle sequences instead of altering them
The previous method would always leave a gap between the last value and the
new one due to how you have to update the sequence values. To remove gaps in
all situations, the options are to alter the USER_SEQUENCES table or just
drop the sequence and recreate it. The prior requires elevated priveleges
and the latter can break attached objects. Since we don't attach objects to
the sequences, we won't have any problems doing it for the tests.

PHPBB3-11219
2012-11-20 04:40:06 -06:00
Patrick Webster
41a95d2c64 [ticket/11219] Update sequence values after loading fixtures
If a value is provide for an auto_increment type of column, certain DBMSes
do not update their internal sequencers. If a row is inserted later, it can
be given an ID that is already in use, resulting in an error. The database
test cases now resynchronise the sequencers before the tests are run.

PHPBB3-11219
2012-11-18 20:38:58 -06:00
Igor Wiedler
5bc0f4b3d4 [ticket/11015] Move db driver class name fixing to function
PHPBB3-11015
2012-11-17 00:24:32 +01:00
Igor Wiedler
8f8a7f7637 [ticket/11015] Allow full dbms class name in tests/test_config.php
PHPBB3-11015
2012-11-16 01:50:30 +01:00
Igor Wiedler
423c79e106 Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (22 commits)
  [ticket/11206] Remove includes to non-existent files from download/file.php
  [ticket/11205] Fix merge conflict in readme.html.
  [ticket/11202] Check response success before content assertions.
  [ticket/11204] Reindent.
  [ticket/11198] Remove additional asterix as /** is doc-block only
  [ticket/11200] Add a reminder comment.
  [ticket/11202] Custom message does not make sense here, delete it.
  [ticket/11202] Check response success before content assertions.
  [ticket/11202] Add a heuristic function to check for response success.
  [ticket/11200] Make cache available during container construction
  [ticket/11199] Match cache purge container files against container_*
  [ticket/11199] Purge dumped container correctly on cache purge.
  [ticket/11199] Revert merge of 'marc1706/ticket/11199' into develop
  [ticket/11199] Cache purge does not remove dumped container
  [ticket/11198] Store the swapping partners in vars and simplify the logic
  [ticket/11198] Correctly set links after an item is moved up/down with AJAX
  [ticket/11197] Prefix the css classes for the small arrow with "arrow"
  [ticket/10879] Remove arrow icon from attachment link in editor
  [ticket/11195] Condense logic, remove improperly formatted if()
  [ticket/11190-develop] Functional tests purge cache before running.
  ...

Conflicts:
	tests/test_framework/phpbb_database_test_connection_manager.php
2012-11-16 01:23:24 +01:00
Igor Wiedler
a23eebdb7b [tracker/11015] Prepend phpbb_db_driver_ for PHPBB_TEST_DBMS
PHPBB3-11015
2012-11-16 01:19:57 +01:00
Oleg Pudeyev
109a86520f Merge PR #1060 branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11186] Database unit tests fail on windows using sqlite2
2012-11-15 16:31:03 -05:00
Oleg Pudeyev
17a7c4821a Merge PR #1060 branch 'nickvergessen/ticket/11186' into develop-olympus
* nickvergessen/ticket/11186:
  [ticket/11186] Database unit tests fail on windows using sqlite2
2012-11-15 16:00:39 -05:00
Oleg Pudeyev
ec06d5c5d9 [ticket/11204] Reindent.
PHPBB3-11204
2012-11-15 14:52:53 -05:00
Andreas Fischer
b9e1caa81a Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11202] Custom message does not make sense here, delete it.
  [ticket/11202] Check response success before content assertions.
  [ticket/11202] Add a heuristic function to check for response success.

Conflicts:
	tests/test_framework/phpbb_functional_test_case.php
2012-11-15 20:24:37 +01:00
Andreas Fischer
14a42a97a8 Merge remote-tracking branch 'p/ticket/11202-olympus' into develop-olympus
* p/ticket/11202-olympus:
  [ticket/11202] Custom message does not make sense here, delete it.
  [ticket/11202] Check response success before content assertions.
  [ticket/11202] Add a heuristic function to check for response success.
2012-11-15 19:48:46 +01:00
Oleg Pudeyev
af7ab2d3ac [ticket/11202] Custom message does not make sense here, delete it.
PHPBB3-11202
2012-11-15 08:40:29 -05:00
Oleg Pudeyev
4ab178f3ef [ticket/11202] Add a heuristic function to check for response success.
This tries to account for php sending fatal errors with 200 status code.

PHPBB3-11202
2012-11-15 08:24:27 -05:00