* develop-olympus:
[ticket/11601] Add protected method for database sync and call it
[ticket/11601] Split post_setup_synchronisation logic from xml parsing
# By Joas Schilling
# Via Joas Schilling (1) and Nils Adermann (1)
* remotes/upstream/develop-olympus:
[ticket/11590] Close database connections when tearDown() is called
* 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
* 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
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
* upstream/develop: (666 commits)
[ticket/11077] Remove code from old global announcements system
[ticket/11189] Replace DEBUG_EXTRA with DEBUG
[ticket/11189] Always log critical errors when in cron or in image output
[ticket/11187] Added a blank array to fix errors in functional tests
[ticket/10780] Make L_COLON available in the installer.
[ticket/11183] Remove $load_extensions and weird dl() calls
[ticket/10970] Added extra documentation to parse_dynamic_path.
[ticket/10939] Added documentation for phpbb_request::file
[ticket/10865] Use code tags for install/database_update.php.
[ticket/10865] Should have been a slash.
[ticket/10780] Use L_COLON on LDAP page.
[ticket/10780] Use L_COLON on search backend ACP pages.
[ticket/10780] Use L_COLON for "download all attachments".
[ticket/10780] Use colon from language in ucp_pm_compose.php where possible.
[ticket/10780] Replace colons in phpBB/adm/style/acp_ext_details.html.
[ticket/10780] Replace colon usage in adm template output with {L_COLON}
[ticket/10780] Replace colon usage in template output with {L_COLON}
[ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [develop-olympus]
[ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2)
[ticket/10172] Show prosilver birthday list even if there are no birthdays.
...
Conflicts:
phpBB/common.php
phpBB/download/file.php
phpBB/includes/db/dbal.php
phpBB/includes/db/firebird.php
phpBB/includes/db/mssql.php
phpBB/includes/db/mssql_odbc.php
phpBB/includes/db/mssqlnative.php
phpBB/includes/db/mysql.php
phpBB/includes/db/mysqli.php
phpBB/includes/db/oracle.php
phpBB/includes/db/postgres.php
phpBB/includes/db/sqlite.php
phpBB/includes/extension/manager.php
phpBB/install/database_update.php
PHPBB3-11015
This allows us to just create the object without having to include the
driver first. However, it also means that users must specify the full
class name in config.php
Allow ODBC connections for Firebird
Capitalize fixture tables and columns for Firebird
On database drop failure, drop all tables
Provide cleanup utilities for databases that cannot be dropped
PHPBB3-10678
Move most of the methods to a separate connection manager class. The
test case creates a manager to handle database creation, schema loading
and more. Most of the methods could be simplified because they can
access shared pdo, config and dbms data.
PHPBB3-10043
Due to the usage of `__DIR__` for the file includes the tests can't
be ran on systems with PHP < 5.3. Replace all occurances of
`__DIR__` with `dirname(__FILE__)`.
PHPBB3-10011
Two first simple tests to check functionality of session_begin and
session_create.
Added a mock class for the cache as well as a subclass of session
which has its cookie handling function mocked out to avoid header
sending problems.
PHPBB3-9732
The blacklisting of these static variables is necessary because code coverage
will otherwise consume too much memory. The problem did not exist in earlier
PHPUnit versions because all classes beginning with PHPUnit are automatically
blacklisted, and code coverage as well as a few other internal classes were
still internal parts of PHPunit. These were now moved to PHP_ namespace,
causing the problem with backupStaticAttributes.
PHPBB3-9967
To allow execution of the tests with different configurations without having
to use the test_config.php file, environment variables of the form
PHPBB_TEST_<name> can now be used, e.g. PHPBB_TEST_DBMS to set the variables
otherwise expected in test_config.php
PHPBB3-9868
Tests are run with sqlite by default now anyway, so in the majority of cases
the error message explaining how to set up database test running will not be
displayed anyway. Database tests are now generally simply skipped if no
configuration can be found. The RUNNING_TESTS.txt file explains how to set
them up however, and more info is available on the wiki.
The get_database_config method was moved from test_case_helpers to
database_test_case because it has no general purpose.
PHPBB3-9868
Calling initialisation to then use the member directly seems more
complicated than just having a method that returns the instance or
creates it if necessary.
PHPBB3-9868
The database base test will need a few more changes to run on all the
databases we support. But those really need to be made on a system where
they run and can be tested. Patches welcome!
There is now a phpbb_database_test_case which can be used as a base class for tests that require database access. You have to set up a test_config.php file in your tests/ directory containing host, user, pass etc.
Extra test functionality has been moved to phpbb_test_case_helpers to provide the same functionality in database tests and regular tests without duplicating the code. This is achieved through delegation of method calls.