1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

845 Commits

Author SHA1 Message Date
Oleg Pudeyev
326b6eb857 [ticket/10975] Add a test for viewing a profile.
PHPBB3-10975
2012-12-13 07:41:24 -05:00
Oleg Pudeyev
b42a228312 [ticket/10975] Test restricting by first character.
PHPBB3-10975
2012-12-13 07:33:02 -05:00
Oleg Pudeyev
4de07338ef [ticket/10975] Avoid rewriting global config twice.
PHPBB3-10975
2012-12-13 07:30:00 -05:00
Oleg Pudeyev
c5f350906d [ticket/10975] Test memberlist, not user creation.
PHPBB3-10975
2012-12-13 07:27:40 -05:00
Fyorl
2d5bd24fde [ticket/10975] Some quick tests to check the memberlist behaviour
Checks behaviour when adding and deleting a user.

PHPBB3-10975
2012-12-13 07:22:45 -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
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
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
3c542b852a Merge PR #1125 branch 'p/ticket/10972' into develop-olympus
* p/ticket/10972:
  [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
2012-12-10 06:04:24 -05:00
Andreas Fischer
bd987b6e14 Merge remote-tracking branch 'p/ticket/11095-develop' into develop
* p/ticket/11095-develop:
  [ticket/11095] Restore brace on previous line.
  [ticket/11095] Docs and tests for phpbb_build_hidden_fields_for_query_params.
  [ticket/11095] Forward GET parameters into hidden fields for jumpbox.
  [ticket/11095] Python quoteattr port.
  [ticket/11095] Use get method in jumpboxes.
2012-12-08 16:14:42 +01:00
Andreas Fischer
f043b14f79 Merge remote-tracking branch 'p/ticket/11255' into develop
* p/ticket/11255:
  [ticket/11255] Change search tests to use mock cache.
  [ticket/11255] Fix dbal write sequence test to run standalone.
2012-12-08 14:11:34 +01:00
Andreas Fischer
b7b8fefdd0 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10205] Reduce nesting in mysql drivers.
  [ticket/10205] Rewrite _sql_error implementations to have a single return.
  [ticket/10205] Cosmetic changes.
  [ticket/10205] Add some columns to the empty fixture file for mssqlnative.
  [ticket/10205] Delete stray return.
  [ticket/10205] Test failed connection attempts.
  [ticket/10205] Check for function existence in mssql connect method.
  [ticket/10205] Convert mssqlnative driver to the same logic.
  [ticket/10205] Fix a parse error in oracle driver.
  [ticket/10205] Fix remaining db drivers.
  [ticket/10205] Avoid calling mysqli functions when mysqli is missing.
  [ticket/10205] Account for potentially missing extensions in dbal.

Conflicts:
	tests/fixtures/empty.xml
2012-12-08 03:08:21 +01:00
Andreas Fischer
b5f94a14f1 Merge remote-tracking branch 'p/ticket/10205' into develop-olympus
* p/ticket/10205:
  [ticket/10205] Reduce nesting in mysql drivers.
  [ticket/10205] Rewrite _sql_error implementations to have a single return.
  [ticket/10205] Cosmetic changes.
  [ticket/10205] Add some columns to the empty fixture file for mssqlnative.
  [ticket/10205] Delete stray return.
  [ticket/10205] Test failed connection attempts.
  [ticket/10205] Check for function existence in mssql connect method.
  [ticket/10205] Convert mssqlnative driver to the same logic.
  [ticket/10205] Fix a parse error in oracle driver.
  [ticket/10205] Fix remaining db drivers.
  [ticket/10205] Avoid calling mysqli functions when mysqli is missing.
  [ticket/10205] Account for potentially missing extensions in dbal.
2012-12-08 03:04:05 +01:00
Oleg Pudeyev
5af3d14af3 [ticket/11255] Change search tests to use mock cache.
PHPBB3-11255
2012-12-07 15:32:26 -05:00
Oleg Pudeyev
5b368dd53a [ticket/11255] Fix dbal write sequence test to run standalone.
PHPBB3-11255
2012-12-07 15:32:06 -05:00
Igor Wiedler
a8deb7f87b Merge remote-tracking branch 'p/ticket/11248' into develop-olympus
* p/ticket/11248:
  [ticket/11248] Line endings to LF.
2012-12-07 19:09:12 +01: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
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
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
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
Oleg Pudeyev
18bcb9f804 Merge PR #1101 branch 'Noxwizard/ticket/11219' into develop-olympus
* Noxwizard/ticket/11219:
  [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:16:55 -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
dc649ad3cd [ticket/11248] Line endings to LF.
PHPBB3-11248
2012-12-05 20:11:00 -05:00
Oleg Pudeyev
89c9c9d4b0 [ticket/10205] Cosmetic changes.
PHPBB3-10205
2012-12-04 21:22:33 -05:00
Andreas Fischer
d9f554fe03 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [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/10716] Only lint on php 5.3+.
  [ticket/10716] php parse all php files as part of the test suite.
2012-12-05 01:20:01 +01:00
Oleg Pudeyev
29c4da6162 [ticket/10205] Add some columns to the empty fixture file for mssqlnative.
Supposedly it choked on the version without any columns thusly:

phpbb_dbal_connect_test::test_failing_connect
PDOException: SQLSTATE[HY090]: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

PHPBB3-10205
2012-12-04 19:00:42 -05:00
Oleg Pudeyev
fb261e19ff [ticket/10716] Collect standard error from executed php process.
php executes everything via a shell. The standard error of this
top level shell is not captured by exec/shell_exec/popen/etc.
and there is no way to capture it. proc_open might work but it
is a nightmare to use and without multiplexing reads from
standard error and standard output it can deadlock.

Thus the solution in this commit. Put the command into a subshell
and redirect standard error to standard output for the subshell.

PHPBB3-10716
2012-12-04 18:52:27 -05:00
Oleg Pudeyev
8ea52b5619 [ticket/10716] Skip test if php is not in PATH.
PHPBB3-10716
2012-12-04 17:43:36 -05: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
8897efe087 [ticket/10716] Exclude our dependencies from linting.
PHPBB3-10716
2012-12-04 16:42:58 -05:00
Oleg Pudeyev
2d3882c412 [ticket/10205] Delete stray return.
PHPBB3-10205
2012-12-04 16:32:57 -05:00
Oleg Pudeyev
f3c043a569 [ticket/10205] Test failed connection attempts.
PHPBB3-10205
2012-12-04 16:29:37 -05:00
Andreas Fischer
2fdd039e52 Merge remote-tracking branch 'p/ticket/10103' into develop
* p/ticket/10103:
  [ticket/10103] New and improved wording.
  [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.
  [ticket/10103] Try a longer sleep for travis.
  [ticket/10103] Convert the rest of the tree to flock class.
  [ticket/10103] Test for flock lock class, with concurrency no less.
  [ticket/10103] Use flock lock class in messenger.
  [ticket/10103] Factor out flock lock class.
2012-12-04 20:26:43 +01:00
Oleg Pudeyev
4133fae99e [ticket/10716] Only lint on php 5.3+.
PHPBB3-10716
2012-12-04 13:58:14 -05:00
Oleg Pudeyev
e22dd7dfad [ticket/10103] Assert with messages.
PHPBB3-10103
2012-12-04 13:50:35 -05:00
Oleg Pudeyev
285feb49f8 [ticket/10103] assertLessThan/assertGreaterThan.
PHPBB3-10103
2012-12-04 13:47:57 -05:00
Oleg Pudeyev
a553cfbc30 [ticket/10103] Inline assignment is bad?
PHPBB3-10103
2012-12-04 13:46:01 -05:00
Andreas Fischer
d7a23df2d9 Merge remote-tracking branch 'p/ticket/9983' into develop
* p/ticket/9983:
  [ticket/9983] Make sql cache test into a black box.
2012-12-04 14:06:15 +01:00
Oleg Pudeyev
af2887f3a7 [ticket/10716] php parse all php files as part of the test suite.
PHPBB3-10716
2012-12-04 03:34:51 -05:00
Oleg Pudeyev
cf3080b83e [ticket/9983] Correct incorrect markTestSkipped call.
PHPBB3-9983
2012-12-04 02:39:50 -05:00
Oleg Pudeyev
fc410e1cd0 [ticket/10103] Try a longer sleep for travis.
Apparently travis takes longer than half a second to fork php.

PHPBB3-10103
2012-12-04 02:38:57 -05:00