1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-04 08:08:12 +01:00

97 Commits

Author SHA1 Message Date
javiexin
bf882826e4
[ticket/14994] Refactor template->assign_block_var
Refactor assign_block_var to use the same block selection mechanism
as is used in alter_block_array.  This allows creating new blocks
at any position in the template structure, not only on the last block.
Allows selecting a block as outer[2].middle.
Added tests.

PHPBB3-14994
2017-11-01 12:29:47 +01:00
Nicofuma
54753e926d [ticket/13132] Enable twig expressions tests
PHPBB3-13132
2015-03-05 21:53:48 +01:00
Tristan Darricau
cf39cfc593 [ticket/13132] Twig: Add loops content to the root context
PHPBB3-13132
2015-03-05 21:38:59 +01:00
Tristan Darricau
d285363700 [ticket/13133] Add unit tests
PHPBB3-13133
2014-10-09 19:54:56 +02:00
Tristan Darricau
7ef983b426 [ticket/12781] Add tests
PHPBB3-12781
2014-06-27 16:41:21 +02:00
Nils Adermann
c5660ed177 [ticket/12382] Event loop nesting inclusion applies to regular includes too
PHPBB3-12382
2014-05-03 00:20:37 +02:00
Joas Schilling
b3a758a43b [ticket/12382] Add template test for subloops inside includes
PHPBB3-12382
2014-04-12 11:13:06 +02:00
Matt Friedman
d8c1c7fb9a [ticket/7580] Add test for IF {VAR} is defined in templates
http://tracker.phpbb.com/browse/PHPBB3-7580
This test demonstrates that is possible to test if a
variable exists and then use it if it does, similar to
using isset(), but in template/twig syntax.
<!— IF {VAR} is defined —>{VAR}<!— ENDIF —>

PHPBB3-7580
2014-03-16 20:38:50 -07:00
Nathan Guse
a45aa2e5a0 [ticket/10288] Test to make sure included templates have proper variable scope
PHPBB3-10288
2014-03-13 19:48:07 -05:00
Nathan Guse
47e364ae68 [ticket/11943] New line at EOF for define_error.html
PHPBB3-11943
2013-11-11 10:59:17 -06:00
Nathan Guse
64ed46e682 [ticket/11943] Forgot template file for test
PHPBB3-11943
2013-11-09 11:39:35 -06:00
Nathan Guse
c609f25bae [ticket/11943] Add test for DEFINE $VAR = false
PHPBB3-11943
2013-11-04 12:15:02 -06:00
Nathan Guse
9152455d70 [ticket/11816] Fix multiple parenthesis as well before $VARs in templates
PHPBB3-11816
2013-09-19 12:40:53 -05:00
rechosen
658f6e2045 [ticket/11843] Added newlines and included numbers in the DEFINE vars test
Per suggestion of nickvergessen, I added newlines in the DEFINE variables with
underscores test. Now if the test fails, it's easier to spot which part is
failing. Also added a test for DEFINE variables containing numbers.

PHPBB3-11843
2013-09-13 13:53:39 +02:00
rechosen
45ecbae1ed [ticket/11843] Add checking DEFINE variables with underscores to template_test
To prevent the underscore in DEFINE variables from being forgotten again,
the template tests now test INCLUDEing a file based on the contents of a
DEFINE variable with underscores in it.

PHPBB3-11843
2013-09-13 12:27:07 +02:00
Nathan Guse
bcb1392351 Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11816
# By Joseph Warner (187) and others
# Via Nathan Guse (6) and others
* 'develop' of github.com:phpbb/phpbb3: (195 commits)
  [ticket/11828] Fix greedy operators in lexer
  [ticket/11835] Fix ucp_auth_link adding in migration
  [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved.
  [ticket/develop/11832] Fix path detection
  [feature/oauth] Fix tabindex
  [ticket/9550] Add the core.viewtopic_post_rowset_data event to viewtopic.php
  [ticket/11829] Use report_closed to determine status in MCP report_details
  [feature/oauth] Fix bug on ucp_auth_link related to error display
  [feature/oauth] More small fixes
  [feature/oauth] More minor changes from review
  [feature/oauth] Fix small bug introduced by update in OAuth library
  [feature/oauth] Fix small issues on ucp pages
  [feature/oauth] Fix typo in OAuth logout method
  [feature/oauth] Make token storage service ignorant
  [feature/oauth] Update oauth::logout() to use clearAllTokens()
  [feature/oauth] Update storage implementation due to inteface change
  [feature/oauth] Update lusitanian/oauth to stable branch
  [ticket/11822] Use namespace lookup order for asset loading
  [feature/oauth] Update comment on oauth service exception
  [feature/oauth] Forgot to remove placeholder comment
  ...

Conflicts:
	phpBB/phpbb/template/twig/lexer.php
	tests/template/template_test.php
2013-09-12 22:56:54 -05:00
Nathan Guse
8c2f73bb09 [ticket/11828] Fix greedy operators in lexer
Use lazy operators and use stricter validation

PHPBB3-11828
2013-09-12 14:15:41 -05:00
Nathan Guse
65f52d7575 Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11816
# By David King (16) and others
# Via David King (13) and others
* 'develop' of github.com:phpbb/phpbb3: (67 commits)
  [ticket/11825] Move schema_data.php into includes/ instead of phpbb/
  [ticket/11215] Remove unnecessary comment
  [ticket/11755] MySQL upgrader out of date
  [prep-release-3.0.12] Update Changelog for 3.0.12-RC3 release.
  [prep-release-3.0.12] Bumping version number for 3.0.12-RC3.
  [ticket/11823] Set up nginx server to match PHP files with characters after .php
  [ticket/11812] Fix empty define
  [ticket/11818] Update Symfony dependencies to 2.3.*
  [ticket/11791] Load adm/ events from styles/adm/event/
  [ticket/11215] Fix helper_url_test.php tests
  [ticket/11215] Add newline back to .htaccess, fix wording
  [ticket/11215] Update comment in .htaccess
  [ticket/11215] Uncomment rewrite rules in .htaccess
  [ticket/11215] Make controller helper url() method use correct format
  [ticket/11215] Add commented-out URL rewrite capability to .htaccess
  [ticket/11821] Fix comma usage next to "You are receiving this notification".
  [ticket/11769] Allow using 0 as poster name
  [ticket/11769] Allow '0' as username
  [ticket/11215] Use new URL structure for controllers
  [ticket/11215] Everything appears to be working...
  ...

Conflicts:
	phpBB/phpbb/template/twig/lexer.php
	tests/template/template_test.php
2013-09-06 09:08:53 -05:00
Nathan Guse
11317ef261 [ticket/11816] !$DOESNT_EXIST test
PHPBB3-11816
2013-09-06 09:04:40 -05:00
Nathan Guse
c8d5ec8927 [ticket/11812] Fix empty define
PHPBB3-11812
2013-09-02 16:35:42 -05:00
Nathan Guse
0c5a39a3ed [ticket/11816] Test !$DEFINITION
PHPBB3-11816
2013-09-02 15:50:34 -05:00
Joas Schilling
9d6370751f Merge remote-tracking branch 'EXreaction/ticket/11724' into develop
* EXreaction/ticket/11724:
  [ticket/11724] Handle ELSE IF separately
  [ticket/11724] Replace spaces with tabs
  [ticket/11724] Support "ELSE IF" and "ELSEIF" in the same way
2013-08-30 19:53:54 +02:00
Nathan Guse
62e81d174d [ticket/11816] Fix define/loop checks in IF statements containing parenthesis
PHPBB3-11816
2013-08-29 10:00:24 -05:00
Nathan Guse
d5c56c5d50 [ticket/11724] Support "ELSE IF" and "ELSEIF" in the same way
PHPBB3-11724
2013-07-27 20:02:03 -05:00
Nathaniel Guse
c0b9db1c62 [ticket/11701] Fix loops var check
PHPBB3-11701
2013-07-23 09:26:50 -05:00
Andreas Fischer
7d8e80241c Merge remote-tracking branch 'EXreaction/ticket/11718' into develop
* EXreaction/ticket/11718:
  [ticket/11718] Quick test for fixes in ELSEIF
  [ticket/11718] Twig lexer only correcting statements in IF, not ELSEIF

Conflicts:
	tests/template/template_test.php
2013-07-23 04:24:05 +02:00
Nathaniel Guse
375976eb38 [ticket/11707] Twig DEFINE not working as expected
PHPBB3-11707
2013-07-19 14:12:28 -05:00
Nathaniel Guse
1c59ad87b0 [ticket/11718] Quick test for fixes in ELSEIF
PHPBB3-11718
2013-07-19 13:34:08 -05:00
Nathan Guse
d879acb7cc Merge pull request #1519 from cyberalien/ticket/11647
Fix INCLUDEJS URLs handling
2013-07-13 08:46:46 -07:00
Vjacheslav Trushkin
f5c2119e7c [ticket/11647] Always use &amp; for URLs
Remove code for URLs separated with ;
Add test case for mix of & and &amp; in URLs

PHPBB3-11647
2013-07-11 18:13:48 -04:00
Nathaniel Guse
9f5c1e0062 [ticket/11388] Add newlines at EOF
PHPBB3-11388
2013-07-11 15:40:43 -05:00
Nathaniel Guse
159f018056 [ticket/11388] INCLUDECSS
PHPBB3-11388
2013-07-11 15:31:55 -05:00
Vjacheslav Trushkin
6eef2aebd7 [ticket/11647] Fix tests for INCLUDEJS
PHPBB-11647
2013-07-11 15:40:28 -04:00
Nathaniel Guse
648e1e51fa [ticket/11388] INCLUDEJS test for //(url)
PHPBB3-11388
2013-07-11 08:44:48 -05:00
Nathaniel Guse
8d8979eda7 [ticket/11388] Fixing includejs test
Changed expected output to file?(any supplied argument string)&asset_version
=($config['asset_version'])#(any supplied anchor string)

Testing lines one at a time to make checking them easier.

PHPBB3-11388
2013-07-10 13:23:36 -05:00
Nathaniel Guse
f88cdce43a Merge remote-tracking branch 'remotes/cyberalien/feature/twig/includejs_tests' into feature/twig
# By Vjacheslav Trushkin
# Via Vjacheslav Trushkin
* remotes/cyberalien/feature/twig/includejs_tests:
  [feature/twig] Unit tests for includejs
2013-07-10 11:38:48 -05:00
Vjacheslav Trushkin
9725eb19f8 [feature/twig] Unit tests for includejs
PHPBB3-11598
2013-07-10 11:43:52 -04:00
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
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
1f4a717f9e [feature/twig] Add template test for ===, !==
PHPBB3-11598
2013-07-05 10:29:24 -05:00
Nathaniel Guse
81f27fd87e [feature/twig] Add test to make sure nested loops get the correct S_ROW_COUNT
PHPBB3-11598
2013-07-04 10:40:14 -05:00
Nathaniel Guse
c6c064a136 [feature/twig] Fix includejs test
PHPBB3-11598
2013-07-02 11:21:31 -05:00
Nathaniel Guse
6c30441ad4 [feature/twig] Changing INCLUDEJS behavior slightly
Automatically parsing inline variables the same way it is done for
INCLUDE, INCLUDEPHP

PHPBB3-11598
2013-07-01 12:26:01 -05:00
Nathaniel Guse
8c75d1c1bc [feature/twig] Fix template_test.php
Various tests were broken completely, and some things such as whitespace
changed with Twig

PHPBB3-11598
2013-07-01 11:58:16 -05:00
Nathaniel Guse
8bda356dab [feature/twig] Correct includejs test
PHPBB3-11598
2013-06-24 22:40:17 -05:00
Nathaniel Guse
881bc60fbc [feature/twig] Delete invalid constructs template test
Invalid tags is no longer a valid test (invalid tags are ignored)

Twig contains tests for loading files, so we should not need to test this

PHPBB3-11598
2013-06-24 21:55:45 -05:00
Nathan Guse
9fab868f0f Merge remote-tracking branch 'remotes/cyberalien/ticket/11482' into develop
# By Vjacheslav Trushkin
# Via Vjacheslav Trushkin
* remotes/cyberalien/ticket/11482:
  [ticket/11482] Use double quotes for code
  [ticket/11482] Unit tests for advanced DEFINE
  [ticket/11482] Implementation of advanced DEFINE tag
2013-05-20 10:47:45 -05:00
Nathaniel Guse
356bc00a29 [ticket/11435] Mark extension spacing test as incomplete
This test fails until 11435 is fixed

Add newlines at EOF

PHPBB3-11435
2013-04-30 23:21:50 -05:00
Nathan Guse
ab87fe7982 [ticket/11435] Create test to make sure template/event output is equal
PHPBB3-11435
2013-04-25 15:26:59 -05:00
Vjacheslav Trushkin
5e8d92b0a8 [ticket/11482] Unit tests for advanced DEFINE
Unit tests for advanced DEFINE and ENDDEFINE

PHPBB3-11482
2013-04-10 09:00:34 +03:00