1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +01:00

53 Commits

Author SHA1 Message Date
rxu
4ed854c818
[ticket/16288] PHP 8 compatibility
PHPBB3-16288
2020-01-03 02:21:37 +07:00
Marc Alexander
ebac54aa9e
[ticket/14948] Adjust calls for twig and phpunit updates
PHPBB3-14948
2019-05-09 21:40:06 +02:00
rxu
42b7782927
[ticket/14972] Migrate from deprecated getMock() method to createMock()
PHPBB3-14972
2019-05-08 21:57:00 +02:00
Jakub Senko
89d1401a77
[ticket/15742] Remove addslashes_recursively()
PHPBB3-15742
2018-09-13 18:47:14 +02:00
Matt Friedman
14e8113fcf [ticket/14576] Move common required files to bootstrap
PHPBB3-14576
2016-03-31 11:06:47 -07:00
Tristan Darricau
386d31ec63 Merge branch '3.1.x' into 3.2.x
* 3.1.x:
  [ticket/14481] Add tests for x_forwarded_proto header
  [ticket/14481] Use port 443 if https is specified in x-forwarded-proto
  [ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
2016-03-27 12:56:03 +02:00
Marc Alexander
f22bd4e511 [ticket/14481] Add tests for x_forwarded_proto header
PHPBB3-14481
2016-03-10 14:49:23 +01:00
Gaëtan Muller
f6e06da4c6 [ticket/13455] Update calls to request_var()
PHPBB3-13455
2015-02-03 20:50:40 +01:00
Yuriy Rusko
a759704b39 [ticket/12594] Remove @package tags and update file headers
PHPBB3-12594
2014-05-27 20:51:13 +02:00
Nils Adermann
b95fdacdd3 [ticket/11700] Move all recent code to namespaces
PHPBB3-11700
2013-09-16 00:25:27 +02:00
Nils Adermann
da2752e400 [ticket/11700] Modify all code to use the new interface names
PHPBB3-11700
2013-07-14 13:30:52 -04:00
Andreas Fischer
e86ecc0f3b Merge remote-tracking branch 'Fyorl/ticket/10939' into develop
* Fyorl/ticket/10939:
  [ticket/10939] Added documentation for phpbb_request::file
  [ticket/10939] Added tests for phpbb_request::file
  [ticket/10939] Modified the default return for $request->file
  [ticket/10939] Modified fileupload tests to deal with new behaviour
  [ticket/10939] Modified mock request class to handle deactivated $_FILES
  [ticket/10939] Modified acp_groups.php to not use $_FILES
  [ticket/10939] Modified ucp_groups.php to not use $_FILES
  [ticket/10939] Modified functions_user.php to not use $_FILES
  [ticket/10939] Modified message_parser.php to not use $_FILES
  [ticket/10939] Modified functions_upload to not use $_FILES
  [ticket/10939] Modified request test slightly to include $_FILES
  [ticket/10939] Added $_FILES handling to phpbb_request
2012-11-10 23:49:29 +01:00
Andreas Fischer
160c49351b [ticket/8713] Add simple (non-nested) test case for untrimmed set_var().
PHPBB3-8713
2012-09-08 13:44:50 +02:00
Andreas Fischer
4550fff55a [ticket/8713] Use \t in double quotes instead of tabs.
PHPBB3-8713
2012-09-08 13:43:14 +02:00
Andreas Fischer
2c41b9062a [ticket/8713] Use correct parameter for nested data.
PHPBB3-8713
2012-09-08 13:41:51 +02:00
Andreas Fischer
06c3868c27 [ticket/8713] Adjust test method name to other recursive_set_var() tests.
PHPBB3-8713
2012-09-08 13:40:28 +02:00
Nathaniel Guse
b3cd5a649b [ticket/8713] Do not trim login inputs
Create a function to request variables which are not trimmed.

All requests for passwords (except forum passwords) now use the
untrimmed request function.

PHPBB3-8713
2012-09-03 13:32:33 -05:00
Fyorl
aa5f6dffa5 [ticket/10939] Added tests for phpbb_request::file
PHPBB3-10939
2012-08-20 21:41:19 +01:00
Fyorl
48a0810ea5 [ticket/10939] Modified request test slightly to include $_FILES
PHPBB3-10939
2012-08-15 14:21:19 +01:00
Vjacheslav Trushkin
f5bac7686b [ticket/10733] Removing static from data providers
Removing static from data provider functions

PHPBB3-10733
2012-04-01 19:14:53 +03:00
Unknown
66c50f6b30 [ticket/9916] Updating license in non-distributed files
PHPBB3-9916
2012-01-02 19:10:36 +01:00
Andreas Fischer
a01e916737 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9916] Changing header in non-distributed files
  [ticket/9916] Changing coding guidelines license
  [ticket/9916] Updating License in the header

Conflicts:
	tests/mock/cache.php
2012-01-02 17:36:21 +01:00
Unknown
17991823ea [ticket/9916] Updating License in the header
PHPBB3-9916
2012-01-02 16:18:32 +00:00
Igor Wiedler
fd08cd8dd0 [feature/request-class] Remove $html_encode arg, force manual decoding
PHPBB3-9716
2011-08-18 23:19:48 +02:00
Igor Wiedler
a48889fed8 [feature/request-class] Add is_secure method to request for HTTPS
PHPBB3-9716
2011-08-18 22:26:30 +02:00
Igor Wiedler
24e9fb24d1 [feature/request-class] Make server() use the $html_encode parameter
$request->server() should not auto html-escape values. header() however should.
Also introduce some tests for this behaviour.

Thanks to nn- for catching this.

PHPBB3-9716
2011-08-06 19:47:12 +02:00
Igor Wiedler
0bf6966c52 [feature/request-class] Add server(), header() and is_ajax() to request
Extend the request class with helpers for reading server vars (server())
and HTTP request headers (header()). Refactor the existing code base
to make use of these helpers, make $_SERVER a deactivated super global.

Also introduce an is_ajax() method, which checks the X-Requested-With
header for the value 'XMLHttpRequest', which is sent by JavaScript
libraries, such as jQuery.

PHPBB3-9716
2011-07-15 22:34:24 +02:00
Erik Frèrejean
14891cdf4e [ticket/10011] Tests don't work on PHP < 5.3
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
2011-01-31 12:58:18 +01:00
Igor Wiedler
01fe91c5c4 [ticket/9987] Rename test files to include a _test suffix
PHPBB3-9987
2011-01-10 00:18:37 +01:00
Igor Wiedler
69616db1ed [ticket/9981] Fix unit test dependencies
PHPBB3-9981
2011-01-07 22:45:39 +01:00
Igor Wiedler
9a52bd0301 [task/phpunit-xml] Use phpunit.xml for test suite
PHPBB3-9967
2011-01-04 22:54:01 +01:00
Nils Adermann
60bd1edcb5 [develop-olympus] Backported 3.1 unit tests to 3.0.
Start adding unit tests for bugs you fix! Tests for anything are
welcome really. We have to work on these a lot.
2010-03-10 16:24:19 +01:00
Nils Adermann
458b8841eb [ticket/10080] Allow resetting the request instance used by request_var.
PHPBB3-10080
2011-03-07 18:54:52 +01:00
Erik Frèrejean
2e54212309 [ticket/10011] Tests can't be ran on PHP < 5.3
Apply the `__DIR__` fix to some remaining Ascraeus tests

PHPBB3-10011
2011-01-31 14:02:30 +01:00
Andreas Fischer
d06657c995 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10011] Tests don't work on PHP < 5.3

Conflicts:
	tests/security/redirect_test.php
2011-01-31 13:26:20 +01:00
Igor Wiedler
b5c8349f4a Merge branch 'develop-olympus' into develop
This merge commit includes ascraeus-specific renames and adjustments.
2011-01-10 00:37:47 +01:00
Igor Wiedler
5373f8157d Merge branch 'ticket/igorw/9979' into develop
* ticket/igorw/9979:
  [ticket/9979] Support autoloading in unit tests
2011-01-09 23:12:41 +01:00
Igor Wiedler
c1950004b4 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9981] Fix unit test dependencies
2011-01-09 23:11:58 +01:00
Igor Wiedler
eb6283ea3d [ticket/9979] Support autoloading in unit tests
PHPBB-9979
2011-01-07 22:17:50 +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
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
Nils Adermann
2ed9d7878e Merge branch 'develop-olympus' into develop
Conflicts:
	tests/all_tests.php
	tests/request/all_tests.php
	tests/request/request_var.php
	tests/security/all_tests.php
	tests/security/extract_current_page.php
	tests/security/redirect.php
	tests/template/all_tests.php
	tests/template/template.php
	tests/template/templates/define.html
	tests/template/templates/expressions.html
	tests/template/templates/if.html
	tests/template/templates/includephp.html
	tests/template/templates/loop.html
	tests/template/templates/loop_advanced.html
	tests/template/templates/loop_vars.html
	tests/test_framework/framework.php
	tests/test_framework/phpbb_test_case.php
	tests/text_processing/all_tests.php
	tests/text_processing/make_clickable.php
	tests/utf/all_tests.php
	tests/utf/utf8_clean_string_test.php
	tests/utf/utf8_wordwrap_test.php
2010-03-10 16:43:42 +01:00