This is the first step of making the test suite use a single directory
for writing files to, this directory being tests/tmp.
The cache test, instead of tests/cache/tmp, now writes to tests/tmp/cache.
Also remove cache directory in setUp method, in case an earlier test run
did not complete successfully and the cache directory was not cleaned up.
Finally, this change makes the cache test take responsibility over the entire
contents of its cache directory.
PHPBB3-10013
* ticket/nickvergessen/9823:
[ticket/9823] Replace 0x80000000 with -2147483648 in tests.
[ticket/9823] Move mock file into the mock/ folder.
[ticket/9823] Update Unit tests to the new system and correct some minor issues
[ticket/9823] Update copyright year and add newline at the end of the file.
[ticket/9823] Correct unit-tests to use self:: instead of the class-name.
[ticket/9823] Unit tests for validate_config_vars.
[ticket/9823] Unit tests for build_cfg_template.
[ticket/9823] Unit tests for validate_rang.
[ticket/9823] Unit tests for h_radio.
[ticket/9823] Moving the functions. Unit tests for build_select.
Conflicts:
phpBB/adm/index.php
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
* develop-olympus:
[task/session-tests] Renamed assertSqlResultEquals and fixed its param order
[task/session-tests] Test additional combinations of session_begin.
[task/session-tests] Added tests for the session class.
Conflicts:
tests/mock/cache.php
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
Rename $unicode to $unicode_support, pass in $use_unicode defaulting to true.
In unit tests we can now pass in $use_unicode as false and also test the code
path that is taken when PCRE does not support unicode.
PHPBB3-9933
* develop-olympus:
[ticket/9990] Add docs for running slow tests
[ticket/9990] Integrate utf normalizer tests into test suite
Conflicts:
phpunit.xml.dist
There is a phpbb_config class which simply holds an array and does not persist
any data. It implements ArrayAccess, Countable and IteratorAggregate to allow
regular use of configuration as if it was still an array. The phpbb_config_db
class depends on an instance of the dbal and a cache driver. It obtains the
configuration data from cache and database as necessary and persists data to
the database.
The functions set_config and set_config_count remain for backward compatability
but they only call methods on the new config class now instead of directly
manipulating the database and cache.
PHPBB3-9988
They are now refered to as cache drivers rather than ACM classes. The
additional utility functions from the original cache class have been
moved to the cache_service. The class loader is now instantiated without
a cache instance and passed one as soon as it is constructed to allow
autoloading the cache classes.
PHPBB3-9983
* develop-olympus:
[ticket/9933] Create unit test for word censor regular expression.
[ticket/9933] Move word censor regex into separate function in functions.php
[ticket/9933] Wrong handling consecutive multiple asterisks in word censor
Conflicts:
phpBB/includes/cache.php
This commit also ports all ascraeus tests to the new format.
Conflicts:
tests/all_tests.php
tests/network/all_tests.php
tests/request/all_tests.php
tests/request/request_var.php
tests/template/templates/includephp.html
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
* feature/igorw/request-class:
[feature/request-class] Convert some remaining cookies
[feature/request-class] Adjust misleading comment
[feature/request-class] Remove direct access to _REQUEST in acp_search
[feature/request-class] Special case of direct access to _REQUEST
Closing tags converted using Oleg's script.
remove-php-end-tags.py -a .
Trailing newlines added using the following where $ext is file extension.
find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s;
Extensions: php, css, html, js, xml.
PHPBB3-9556