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

301 Commits

Author SHA1 Message Date
Dhruv
82a630cd64 [ticket/11493] add check for phpBB Debug in functional tests
PHPBB3-11493
2013-04-15 20:41:05 +05:30
Andreas Fischer
9a0992f6a0 Merge remote-tracking branch 'p/ticket/11295' into develop-olympus
* p/ticket/11295:
  [ticket/11295] Drop tables rather than database for postgres in test suite.
2013-01-23 15:45:18 +01:00
Andreas Fischer
a83c766ebd Merge remote-tracking branch 'p/ticket/11323-olympus' into develop-olympus
* p/ticket/11323-olympus:
  [ticket/11323] Backport include_define test to olympus.
2013-01-22 20:32:07 +01:00
Oleg Pudeyev
227f7f46df Merge PR #1194 branch 'marc1706/ticket/11323' into develop-olympus
# By Marc Alexander
# Via Marc Alexander
* marc1706/ticket/11323:
  [ticket/11323] Add tests for inclusion of defined variables
2013-01-13 20:11:31 -05:00
Marc Alexander
4c50a35b62 [ticket/11323] Add tests for inclusion of defined variables
This adds 2 tests for the template engine. The test using
include_define_variable.html will test if a defined variable, which was
defined with another template variable, can be used to include a file.
The second test will do the same inside a loop using a loop variable.

PHPBB3-11323
2013-01-14 01:14:29 +01:00
Oleg Pudeyev
90235754b3 [ticket/11323] Backport include_define test to olympus.
PHPBB3-11323
2013-01-13 18:28:51 -05:00
Oleg Pudeyev
bc797c7da2 [ticket/11294] Capitalize phpunit.
PHPBB3-11294
2012-12-26 10:41:13 -05:00
Oleg Pudeyev
02a1777fcb [ticket/11295] Drop tables rather than database for postgres in test suite.
Doing so allows:

1. User running the tests no longer needs create database privilege.
2. Test database may be located in a non-default tablespace and generally
have site-specific options applied to it.

PHPBB3-11295
2012-12-26 00:31:43 -05:00
Oleg Pudeyev
c0b3151f0d [ticket/11294] Update required/optional extension list for olympus.
PHPBB3-11294
2012-12-25 07:23:46 -05:00
Oleg Pudeyev
00d8f944da [ticket/11285] Use more granularity in dependency checks in compress test
Some of the tests can be run without zlib or bz2 extensions present.

PHPBB3-11285
2012-12-20 13:20:05 -05:00
Nathan Guse
175b6deb6d [ticket/8610] Do not use requests to submit posts except in posting_test.php
Moving my functional test functions from posting_helpers.php to
posting_test.php since it is a bit nicer and more reusable if
posting_test.php is to be expanded in the future.

PHPBB3-8610
2012-12-15 16:22:54 -06:00
Nathan Guse
d739745ea4 [ticket/8610] Move posting helpers to separate file
This is to prevent cluttering up the functional test case class more

PHPBB3-8610
2012-12-13 23:09:45 -06:00
Nathan Guse
9eb9fa2b9d [ticket/8610] Create helper functions to create topic/post in functional tests
This will be used to test splitting/copying/merging/etc in functional tests

Also convert functional posting_test.php to use these functions

PHPBB3-8610
2012-12-13 22:38:17 -06:00
Andreas Fischer
f4df152b4b Merge remote-tracking branch 'p/ticket/11162' into develop-olympus
* p/ticket/11162: (22 commits)
  [ticket/11162] Reformat.
  [ticket/11162] Rename tricky updates to database helper.
  [ticket/11162] Use empty($queries).
  [ticket/11162] Review comments fixed.
  [ticket/11162] Reformat.
  [ticket/11162] Newlines to LF.
  [ticket/11162] Use correct functions.
  [ticket/11162] Account for notify_status.
  [ticket/11162] This test really only works for bookmarks.
  [ticket/11162] The test is not at all trivial.
  [ticket/11162] Add includes.
  [ticket/11162] Move to a separate file to avoid blowing out functions.php.
  [ticket/11162] No whitespace changes in olympus.
  [ticket/11162] Fix inaccurately copy pasted comment.
  [ticket/11162] Use phpbb_update_rows_avoiding_duplicates in mcp.
  [ticket/11162] Clarify that only the two tables actually work.
  [ticket/11162] Uncomment transactions.
  [ticket/11162] An implementation that actually works.
  [ticket/11162] Make count function upper case.
  [ticket/11162] Rename count variable name to remaining_rows.
  ...
2012-12-14 02:55:07 +01:00
Oleg Pudeyev
789c04b900 [ticket/11265] Add assertions for board installation success.
PHPBB3-11265
2012-12-13 15:42:00 -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
a686910958 [ticket/11162] Reformat.
PHPBB3-11162
2012-12-13 03:07:25 -05:00
Oleg Pudeyev
1441b70ae8 [ticket/10491] Make recreate_database static.
PHPBB3-10491
2012-12-12 21:47:48 -05:00
Oleg Pudeyev
e2c67a8e42 [ticket/11162] Rename tricky updates to database helper.
PHPBB3-11162
2012-12-12 21:46:38 -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
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
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
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
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
fe87d441ee [ticket/11162] Review comments fixed.
PHPBB3-11162
2012-12-05 10:44:36 -05:00
Oleg Pudeyev
6872104aa9 [ticket/11162] Account for notify_status.
PHPBB3-11162
2012-12-05 00:07:01 -05:00
Oleg Pudeyev
efe122b032 [ticket/11162] This test really only works for bookmarks.
PHPBB3-11162
2012-12-04 23:40:30 -05:00
Oleg Pudeyev
58951ef105 [ticket/11162] The test is not at all trivial.
PHPBB3-11162
2012-12-04 23:37:57 -05:00
Oleg Pudeyev
0f96b1aad3 [ticket/11162] Move to a separate file to avoid blowing out functions.php.
PHPBB3-11162
2012-12-04 23:35:34 -05:00
Oleg Pudeyev
89c9c9d4b0 [ticket/10205] Cosmetic changes.
PHPBB3-10205
2012-12-04 21:22:33 -05: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
Oleg Pudeyev
4133fae99e [ticket/10716] Only lint on php 5.3+.
PHPBB3-10716
2012-12-04 13:58:14 -05: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