Documentation

SmartyStringTest extends CiviEndToEndTestCase
in package

Evaluate the security of the Smarty configuration.

The runs as E2E because headless tests will force-load Smarty4, which means that they don't truly test other versions of Smarty.

Tags
group

e2e

Table of Contents

Methods

allowedSmartyCallsProvider()  : array<string|int, mixed>
disallowedSmartyCallProviders()  : array<string|int, mixed>
setUpBeforeClass()  : void
testAllowedSmartyCalls()  : void
Test smarty syntax that should be allowed by the security policy
testDisallowedSmartyCalls()  : void
Test smarty syntax that should be blocked by the security policy

Methods

allowedSmartyCallsProvider()

public allowedSmartyCallsProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

disallowedSmartyCallProviders()

public disallowedSmartyCallProviders() : array<string|int, mixed>
Return values
array<string|int, mixed>

testAllowedSmartyCalls()

Test smarty syntax that should be allowed by the security policy

public testAllowedSmartyCalls(mixed $template, mixed $expectedResult[, array<string|int, mixed> $templateVars = [] ]) : void
Parameters
$template : mixed
$expectedResult : mixed
$templateVars : array<string|int, mixed> = []
Tags
throws
CRM_Core_Exception
dataProvider

allowedSmartyCallsProvider

testDisallowedSmartyCalls()

Test smarty syntax that should be blocked by the security policy

public testDisallowedSmartyCalls(mixed $template, mixed $expectedResult) : void
Parameters
$template : mixed
$expectedResult : mixed
Tags
throws
CRM_Core_Exception
dataProvider

disallowedSmartyCallProviders


        
On this page

Search results