Add priority tests for the other block types except helpers since I do not yet have a helper implemented that sets a value.

master
Tom Alexander 4 years ago
parent 9bdc398a6d
commit eb0eb8d4ca
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -41,6 +41,8 @@ Explicitly setting a context on a block does work.
The explicit context for blocks is evaluated in the context for that template file containing the block, not the inline partial (so, whatever the context is when we invoke the partial containing the block).
Parameters on blocks and inline partials appear to not be read but they do not error out.
References
----------

@ -327,7 +327,7 @@ Section vs Partial priority{~n}
{/some_global}
{>priority:explicit pet="snake"/}
Section vs Exists priority{~n}
Exists vs Partial priority{~n}
=========================={~n}
{?some_global:explicit pet="snake"}
{pet}{~n}
@ -373,3 +373,36 @@ Section Loop set $idx in explicit context and parameter{~n}
$len is {$len}{~n}
{/loop}
{! Lets check the priority order for all the tag types now that we know that sections and partials have a different order !}
Section vs Partial priority{~n}
==========================={~n}
{#some_global:explicit pet="snake"}
{pet}{~n}
{/some_global}
{>priority:explicit pet="snake"/}
Exists vs Section priority{~n}
=========================={~n}
{?some_global:explicit pet="snake"}
{pet}{~n}
{/some_global}
{>priority:explicit pet="snake"/}
Not Exists vs Section priority{~n}
=============================={~n}
{^empty_array:explicit pet="snake"}
{pet}{~n}
{/empty_array}
{>priority:explicit pet="snake"/}
{! TODO: Add helpers once we have a helper that sets a variable !}
{! Do blocks or inline partials have parameters? !}
Do blocks or inline partials have parameters{~n}
============================================{~n}
{+some_block_override pet="snake" name="cuddlebunny"}
{pet}, {name}{~n}
{/some_block_override}
{<some_block_override pet="lizard" name="rover"}
{pet}, {name}{~n}
{/some_block_override}

Loading…
Cancel
Save