Commit graph

19105 commits

Author SHA1 Message Date
Nathan Guse
47ec38c011 [feature/twig] Add simple test to make sure Twig filters/tags are working
PHPBB3-11598
2013-07-08 15:21:27 -05:00
Nathan Guse
70a553e0b5 [feature/twig] Variable regular expressions should be lazy
PHPBB3-11598
2013-07-08 15:16:37 -05:00
Andy Chase
3999d7ec7c [ticket/11620] More mock provider methods
The mock provider object now better matches the interface
given for providers.

PHPBB3-11620
2013-07-08 10:28:40 -07:00
David King
b9c290b548 [ticket/11215] Correct for different URL but same path info
When Symfony Request calculates path info, both of the following URLs give "/"
as the path info: ./app.php and ./app.php/
This commit ensures that the proper correction is made.

PHPBB3-11215
2013-07-06 23:21:57 -04:00
David King
0f522ddf5f [ticket/11215] A few minor optimizations for phpbb_get_web_root_path()
PHPBB3-11215
2013-07-06 23:21:56 -04:00
David King
c20f92ba1e [ticket/11215] Correct paths when path info is used for controller access
PHPBB3-11215
2013-07-06 23:20:21 -04:00
Nathan Guse
0894a13770 [feature/twig] If DEBUG, EVENT will always look for new/missing tpl event files
If debug mode is enabled, lets check for new/removed EVENT templates on
page load rather than at compile. This is slower, but makes developing
extensions easier (no need to purge the cache when a new event template
file is added)

PHPBB3-11598
2013-07-06 16:26:56 -05:00
Nathan Guse
9f85a4d118 [ticket/11420] Use !==, === when comparing strings
PHPBB3-11420
2013-07-06 12:59:26 -05:00
Nathan Guse
bdaa40bb55 [ticket/11420] Fix comments, license link
PHPBB3-11420
2013-07-06 12:58:52 -05:00
Matthew Fonda
300867ab1a [ticket/11630] Improvements to the PHP lint pre-commit hook
The PHP lint pre-commit hook fails to display any output when an error
other than a parse error is decteced.

Additionally, the hook may not display any meaningful output depending
on php.ini settings. This commit removes the dependency on php.ini.

PHPBB3-11630
2013-07-06 12:16:59 -05:00
Nathan Guse
2d7a91ebd6 Merge remote-tracking branch 'remotes/imkingdavid/ticket/11253' into develop
# By David King
# Via David King
* remotes/imkingdavid/ticket/11253:
  [ticket/11253] Put AND clause in correct SQL query
  [ticket/11253] Fix a few things brought up in the PR
  [ticket/11253] Fix typo in constant
  [ticket/11253] Add migration to add auth check to UCP signature module
2013-07-06 11:15:04 -05:00
Nathan Guse
e03586f2cf Merge branch 'develop-olympus' into develop
# By Andreas Fischer
# Via Andreas Fischer (1) and Nathan Guse (1)
* develop-olympus:
  [ticket/11619] Use HTTP/1.0 because of lack of chunked-encoding handling.
  [ticket/11619] Some tests for get_remote_file().
2013-07-05 18:21:38 -05:00
Nathan Guse
7c84a12f39 Merge remote-tracking branch 'remotes/bantu/ticket/11619' into develop-olympus
# By Andreas Fischer
# Via Andreas Fischer
* remotes/bantu/ticket/11619:
  [ticket/11619] Use HTTP/1.0 because of lack of chunked-encoding handling.
  [ticket/11619] Some tests for get_remote_file().
2013-07-05 18:21:01 -05:00
Andy Chase
a1168972ff [ticket/11620] Added validate_session to provider.
PHPBB3-11620
2013-07-05 15:00:05 -07:00
Andy Chase
5cdcb689df [ticket/11620] Implemented a provider mock object.
Due to an auth_refactor, there is a new dependency
in session.php on phpbb_container and a provider.

For purposes of testing, implemented a simple one.

PHPBB3-11620
2013-07-05 14:49:30 -07:00
Andy Chase
6f8187f7fa [ticket/11620] Reworked create_test without data provider
PHPBB3-11620
2013-07-05 14:10:04 -07:00
Andy Chase
521d35dd6e [ticket/11620] Add create_test with test for bot detection
Added a test for the creation of a session with a simple test
for detecting whether a bot is present.

PHPBB3-11620
2013-07-05 14:10:02 -07:00
Andy Chase
7ef95ce8ac [ticket/11620] Fix typo and confusingly named test
PHPBB3-11620
2013-07-05 14:10:01 -07:00
Andy Chase
ab1c42babf [ticket/11620] Add indentation, change quote style.
indentation is probably more important than 80 characters per line apparently.
Single quotes instead of double per coding guidelines.

PHPBB3-11620
2013-07-05 14:10:00 -07:00
Andy Chase
290533a14f [ticket/11620] Add validate_referrer test
Add a test for the validate_referrer function.

PHPBB3-11620
2013-07-05 14:09:58 -07:00
Andy Chase
30ebc03d14 [ticket/11620] Remove unneeded functions from testable facade
There are functions listed in testable facade that don't have a lot of dependencies,
instead mostly just take the input and perform database functions on them.
These can be tested without a testable facade function and so will be removed.

PHPBB3-11620
2013-07-05 14:09:57 -07:00
Andy Chase
17890a308b [ticket/11620] Add ipv6 test cases and remove extra arguments.
PHPBB3-11620
2013-07-05 14:09:56 -07:00
Andy Chase
2f92c903e7 [ticket/11620] Make testable_facade non-static, expand.
Make the class functions of testable_facade no longer static methods,
but a class based one and expand the methods to be filled in, in later commits.

PHPBB3-11620
2013-07-05 14:09:54 -07:00
Andy Chase
e8facfc735 [ticket/11620] Add commas in extract_page_test
PHPBB3-11620
2013-07-05 14:09:53 -07:00
Andy Chase
71fbe74ede [ticket/11620] Fix quotes in extract_hostname_test
PHPBB3-11620
2013-07-05 14:09:52 -07:00
Andy Chase
b8d9d7b79f [ticket/11620] Add extract_current_hostname
Add a tests for extracting the current hostname from session.

PHPBB3-11620
2013-07-05 14:09:50 -07:00
Andy Chase
7fd03abcab [ticket/11620] Add data provider to extract_page
These test cases were taken from a live session,
more test cases should be added to test specific
functionality in this function.

PHPBB3-11620
2013-07-05 14:09:49 -07:00
Andy Chase
9f156e9954 [ticket/11620] Rename class_functions_test -> extract_page_test
Renaming this file because it is going to contain a large data provider,
so I'd rather split this test out.

PHPBB3-11620
2013-07-05 14:09:48 -07:00
Andy Chase
e1d957c3ee [ticket/11620] Remove accidental argument from testable_facade.
PHPBB3-11620
2013-07-05 14:09:46 -07:00
Andy Chase
19a348e359 [ticket/11620] Add test for test_extract_current_page
PHPBB3-11620
2013-07-05 14:09:45 -07:00
Andy Chase
1d9d22cc76 [ticket/11620] Add testable facade for sessions.php
Since many functions in session.php have global variables inside the function,
this exposes those functions through a testable facade that uses testable_factory's
mock global variables to modify global variables used in the functions.

 This is using the facade pattern to provide a testable "front" to the functions in sessions.php.

 PHPBB3-11620
2013-07-05 14:09:44 -07:00
Nathan Guse
921d44aa4d [feature/twig] Put $SCRIPTS below overall_footer_after, use includejs for core
Moved below overall_footer_after so events can add JS files in that event.

PHPBB3-11598
2013-07-05 14:17:46 -05:00
Nathan Guse
8d11a147f5 [feature/twig] Use Twig mask for IF statements instead of our own tokenparser
PHPBB3-11598
2013-07-05 14:10:57 -05:00
Nathan Guse
0ffbdc80d1 [feature/twig] context_recursive_loop_builder isn't used anymore, removing it
PHPBB3-11598
2013-07-05 13:15:10 -05:00
Nathan Guse
c5c34ff831 [feature/twig] Add check for defined IN_PHPBB in all new Twig related files
PHPBB3-11598
2013-07-05 13:10:35 -05:00
Nathan Guse
99ddbe1adc [feature/twig] Can't use typehint here, causes tests to fail
PHPBB3-11598
2013-07-05 12:55:32 -05:00
Nathan Guse
9ac61565fd [feature/twig] Add template tests for S_NUM_ROWS and S_BLOCK_NAME
PHPBB3-11598
2013-07-05 12:48:02 -05:00
Nathan Guse
05984be2c0 [feature/twig] Fix S_NUM_ROWS assignment
PHPBB3-11598
2013-07-05 12:47:50 -05:00
Nathan Guse
13c3565454 [feature/twig] Remove style dependency for controller helper
If a controller wants to use set_style, it can just use phpbb_style

PHPBB3-11598
2013-07-05 12:11:59 -05:00
Nathan Guse
1f4a717f9e [feature/twig] Add template test for ===, !==
PHPBB3-11598
2013-07-05 10:29:24 -05:00
Nathan Guse
81f0715b8e [feature/twig] Clarify comment
PHPBB3-11598
2013-07-05 10:05:20 -05:00
Nathan Guse
2674740573 [feature/twig] Spacing
PHPBB3-11598
2013-07-05 10:03:48 -05:00
Nathan Guse
c1a600277d [feature/twig] Nicer code for get_user_style.php()
PHPBB3-11598
2013-07-05 09:57:55 -05:00
Nathan Guse
576d8d7072 [feature/twig] Docs/typehinting for Twig extension
PHPBB3-11598
2013-07-05 09:56:25 -05:00
Nathan Guse
192c9d8f86 [feature/twig] Removing template/renderer.php (no longer used)
PHPBB3-11598
2013-07-05 09:37:40 -05:00
Andreas Fischer
4aef3d0ab9 Merge remote-tracking branch 'Hardolaf/feature/auth-refactor' into develop
* Hardolaf/feature/auth-refactor:
  [feature/auth-refactor] Move auth providers to separate directory
2013-07-05 16:06:07 +02:00
Joseph Warner
5746c8d96f [feature/auth-refactor] Move auth providers to separate directory
Moves the provider files to their own directory per bantu's
suggestion.

PHPBB3-9734
2013-07-04 17:14:19 -04:00
Nathaniel Guse
25b4732845 [feature/twig] Remove debug code
PHPBB3-11598
2013-07-04 15:32:04 -05:00
Nathaniel Guse
0f3086a54b [feature/twig] Spacing
PHPBB3-11598
2013-07-04 15:24:42 -05:00
Nathaniel Guse
53496e6a47 [feature/twig] acp module tpls are in ext/adm, ucp/mcp in styles/
PHPBB3-11598
2013-07-04 15:21:57 -05:00