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

2229 Commits

Author SHA1 Message Date
Nils Adermann
1aef7eb20e [task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests.
PHPBB3-9983
2011-01-09 23:49:44 +01:00
Igor Wiedler
9329b16ab1 [task/acm-refactor] Refactor the ACM classes to have a common interface.
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
2011-01-09 23:49:35 +01:00
Igor Wiedler
36e95f939d [ticket/9979] Support autoloading in unit tests
PHPBB-9979
2011-01-09 23:48:40 +01:00
Igor Wiedler
7129531bc0 [ticket/9981] Fix unit test dependencies
PHPBB3-9981
2011-01-09 23:48:39 +01:00
Igor Wiedler
69616db1ed [ticket/9981] Fix unit test dependencies
PHPBB3-9981
2011-01-07 22:45:39 +01:00
Andreas Fischer
1c95101284 Merge branch 'develop-olympus' into develop
* 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
2011-01-07 15:58:10 +01:00
rxu
95cf47c4ef [ticket/9933] Create unit test for word censor regular expression.
PHPBB3-9933
2011-01-07 15:32:42 +01:00
Igor Wiedler
14a84cf89c Merge branch 'develop-olympus' into develop
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
2011-01-07 01:39:59 +01:00
Nils Adermann
b48b909773 [task/phpunit-xml] Manually blacklisting a few PHPUnit classes from backups.
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
2011-01-07 01:07:30 +01:00
Nils Adermann
b720edb05b [task/phpunit-xml] Force error reporting level E_ALL | ~E_DEPRECATED.
PHPBB3-9967
2011-01-07 00:19:00 +01:00
Igor Wiedler
9a52bd0301 [task/phpunit-xml] Use phpunit.xml for test suite
PHPBB3-9967
2011-01-04 22:54:01 +01:00
Marek A. Ruszczyński
2aa54bb156 [ticket/9746] Added PHP implementation of inet_pton and inet_ntop.
PHPBB3-9746
2011-01-03 00:09:51 +01:00
Andreas Fischer
fdb5c2c990 [ticket/9746] Adding unit tests for inet_ntop() and inet_pton().
PHPBB3-9746
2011-01-03 00:09:51 +01:00
Andreas Fischer
dc7e3550ab [ticket/9746] Adding tests for phpbb_ip_normalise().
PHPBB3-9746
2011-01-03 00:09:40 +01:00
Andreas Fischer
442fc61be7 Merge branch 'feature/igorw/request-class' into develop
* 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
2010-12-16 02:22:17 +01:00
Igor Wiedler
af5b9a9640 [ticket/9556] Drop php closing tags, add trailing newline
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
2010-11-11 19:10:55 +01:00
Andreas Fischer
f164906d77 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [task/mssql-db-tests] Remove MS SQL helper values from SELECT LIMIT results.
  [task/mssql-db-tests] Split up database tests into SELECT and write operations
  [task/mssql-db-tests] PHPUnit output got stuck after unterminated ob_start.
  [task/mssql-db-tests] sql_query_limit must return all results when total = 0
  [task/mssql-db-tests] Add support for odbc & sqlsrv PDO test connections
  [task/mssql-db-tests] Refactored getConnection into multiple smaller parts.
  [task/mssql-db-tests] Allow test configuration with environment variables.
  [task/mssql-db-tests] No longer display an error when skipping db tests.
  [task/mssql-db-tests] Use a simple getter for test case helpers.

Conflicts:
	tests/template/template.php
2010-11-03 11:58:48 +01:00
Nils Adermann
fa8dca2400 [task/mssql-db-tests] Split up database tests into SELECT and write operations
SELECT is based on the user table fixture, write (INSERT/UPDATE/DELETE) is
tested using the config table fixture.

PHPBB3-9868
2010-10-25 19:43:39 +02:00
Nils Adermann
9b4da98653 [task/mssql-db-tests] PHPUnit output got stuck after unterminated ob_start.
PHPBB3-9868
2010-10-25 19:43:39 +02:00
Nils Adermann
801f66b4a2 [task/mssql-db-tests] Add support for odbc & sqlsrv PDO test connections
PHPBB3-9868
2010-10-25 19:43:18 +02:00
Nils Adermann
832035f744 [task/mssql-db-tests] Refactored getConnection into multiple smaller parts.
This is a first step to simplify the extraction of database specific code
parts into separate classes.

PHPBB3-9868
2010-10-25 19:40:11 +02:00
Nils Adermann
a397f81a2b [task/mssql-db-tests] Allow test configuration with environment variables.
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
2010-10-25 19:39:12 +02:00
Nils Adermann
9dbbfea5fd [task/mssql-db-tests] No longer display an error when skipping db tests.
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
2010-10-25 19:38:58 +02:00
Nils Adermann
ee846c461c [task/mssql-db-tests] Use a simple getter for test case helpers.
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
2010-10-25 19:38:35 +02:00
Andreas Fischer
0f49e52940 [ticket/9627] Prefix function names with 'phpbb_'.
PHPBB3-9627
2010-10-23 18:06:46 +02:00
Andreas Fischer
afda5e2073 [ticket/9627] Adding unit tests for http_byte_range().
PHPBB3-9627
2010-10-23 18:04:17 +02:00
Andreas Fischer
5f034c0a0a [ticket/9627] Adding download unit tests.
PHPBB3-9627
2010-10-23 18:04:17 +02:00
Igor Wiedler
6213188280 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9855] Do not include the PHPUnit Framework manually on 3.5+.
  [ticket/9855] Make tests run under PHPUnit 3.5.
2010-10-17 23:36:34 +02:00
Nils Adermann
d56bf3b060 [ticket/9855] Do not include the PHPUnit Framework manually on 3.5+.
PHPBB3-9855
2010-10-17 23:32:57 +02:00
Nils Adermann
e195c91b1d [ticket/9855] Make tests run under PHPUnit 3.5.
PHPBB3-9855
2010-10-17 23:10:49 +02:00
Igor Wiedler
de5ef675ac [feature/request-class] Adjust misleading comment
PHPBB3-9716
2010-10-17 13:56:15 +02:00
Igor Wiedler
684914e635 [feature/request-class] Make additional request test cases run
PHPBB3-9716
2010-09-30 22:18:35 +02:00
Igor Wiedler
55808e11c9 [feature/request-class] Prevent recursive_set_var from applying htmlspecialchars twice
PHPBB3-9716
2010-09-19 15:31:00 +02:00
Igor Wiedler
456de63912 [feature/request-class] Refactor request classes to use autoloading
All class names have been adjusted to use a phpbb_request prefix,
allowing them to be autoloaded.

Also introduces some improvements to autoloading in general.

PHPBB3-9716
2010-09-17 14:08:14 +02:00
Nils Adermann
0ae7df8a51 [feature/request-class] Request class test now uses a type cast helper mock.
Removed the dependency of the request class test on having an actual
phpbb_type_cast_helper instance, by replacing it with an object mocking
the phpbb_type_cast_helper_interface.

PHPBB3-9716
2010-09-17 14:03:47 +02:00
Nils Adermann
ea919ad8b2 [feature/request-class] Refactored request class and wrapper functions.
The request class
- now makes use of the new type cast helper (dependency injection)
- has no static methods anymore.
- now has a constructor argument to leave super globals turned on

Brought back the set_var function in functions.php. It is now a wrapper
around the type cast helper. It creates an instance on the fly.

The request_var wrapper function now has an optional last argument to
inject the request class instance, rather than abusing the $var_name.

PHPBB3-9716
2010-09-17 14:00:01 +02:00
Nils Adermann
85b6d3b9a1 [feature/request-class] Extracted type casting helpers from the request class.
These methods should be available without having to instantiate a request class
object, better separation of concerns. A set_var wrapper around this class no
longer requires a request object at all.

PHPBB3-9716
2010-09-17 14:00:01 +02:00
Nils Adermann
cf3f0f825a [feature/request-class] New request class supports recursive arrays.
So we can enable this old 3 level deep array input entry in
the request_var data provider, it is now also supported!

PHPBB3-9716
2010-09-17 13:50:25 +02:00
Nils Adermann
d7e52ee0f8 [feature/request-class] Adding a request class based on ascraeus-experiment.
The well known request_var function is now a wrapper that calls a method
on a phpbb_request object. The class provides additional functionality.
It can replace all super globals with special objects that throw errors
when being accessed. They still allow isset operations to keep backward
compatibility with isset($_POST['var']) checks. The phpbb_request class
implements the phpbb_request_interface which is available for easy mocking
of input in tests.

PHPBB3-9716
2010-09-17 13:50:09 +02:00
Igor Wiedler
2376f07741 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9825] Add unit test config and db to gitignore
  [ticket/9825] Unit tests: Use sqlite when possible and no test_config exists.
2010-09-16 23:17:52 +02:00
Andreas Fischer
ac753fa853 [ticket/9825] Unit tests: Use sqlite when possible and no test_config exists.
PHPBB3-9825
2010-09-16 00:03:52 +02:00
Andreas Fischer
4d5d50001d Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9592] Slight adjustments to simplify db test cases
  [ticket/9592] Remove test cases for empty IN()
  [ticket/9592] Test suite does not run on SQlite
2010-09-15 16:05:38 +02:00
Igor Wiedler
a4742f795e [ticket/9592] Slight adjustments to simplify db test cases
PHPBB3-9592
2010-09-15 09:50:04 +02:00
Igor Wiedler
566ddf8a4b [ticket/9592] Remove test cases for empty IN()
They failed under SQLite because SQLite accepts empty IN() syntax.

PHPBB3-9592
2010-09-12 00:51:27 +02:00
Igor Wiedler
4fd45adfc5 [ticket/9592] Test suite does not run on SQlite
PHPBB3-9592
2010-09-11 23:34:14 +02:00
Igor Wiedler
9edf0d64a2 [feature/auto-loading] Add test case for phpbb_dir2 =>
includes/dir2/dir2.php

PHPBB3-9682
2010-08-31 20:30:59 +02:00
Nils Adermann
2e787fa836 Merge branch 'develop-olympus' into develop
* develop-olympus: (57 commits)
  Revert "[ticket/7716] Data too long for column 'message_subject'"
  [ticket/7716] Data too long for column 'message_subject'
  [ticket/9780] Adding unit tests for gen_rand_string().
  [ticket/9780] Add length check back to gen_rand_string().
  [ticket/7972] Copying topics in the MCP now indexes the new topic.
  [ticket/9782] Board disable radio set on when server load high
  [ticket/9635] Useless parameter $data['post_time'] in function submit_post.
  [ticket/9104] Safari does not display box headers correctly in the ACP.
  [ticket/9777] Print error message in pre-commit hook when php is not installed.
  [ticket/7716] Data too long for column 'message_subject'
  [task/git-tools] Ignore git commit message comments
  [task/git-tools] Adjust the hook to enforce that a ticket is always mentioned
  [task/git-tools] Vastly expanded commit-msg hook.
  [task/git-tools] Beginnings of a syntax checking hook.
  [task/git-tools] Append ticket identifier to commit message prior to editing.
  [ticket/7332] Redirect users back to post details when performing actions.
  [ticket/7332] Collapse post details content down to a maximum of 300px heigh
  [ticket/9771] Remove query string parameters that have no name.
  [ticket/9760] Remove unrestricted wildcards from search terms.
  [ticket/9599] Reimplement phpbb_checkdnsrr() function.
  ...

Conflicts:
	tests/template/template.php
2010-08-21 23:35:43 +02:00
Andreas Fischer
df111373a6 Merge branch 'feature/naderman/auto-loading' into develop
* feature/naderman/auto-loading:
  [feature/auto-loading] Only check subdir if there is another name part.
2010-08-20 22:05:05 +02:00
Andreas Fischer
e09d6c6d71 [ticket/9780] Adding unit tests for gen_rand_string().
PHPBB3-9780
2010-08-20 21:36:56 +02:00
Nils Adermann
f870434222 [feature/auto-loading] Only check subdir if there is another name part.
PHPBB3-9682
2010-08-19 22:06:19 +02:00