@test(): conditional directive is part of the conditional
loop operator directives. It is an alternative to the switch directive. It internally resolves to use the
switch loop to test values. However, all codes within the test block must be raw php
code. An example of this is shown below
{{: $fruit = 'apple'; }}
@test($fruit):
case 'apple' : echo $fruit;
break;
case 'berry' : echo 'Berry';
default: echo 'boom';
@endtest;
apple