Data provider for testFormat().
testFormat()
function providerFormat() {
$tests[] = array(
'Simple text',
array(),
'Simple text',
'String::format leaves simple text alone.',
);
$tests[] = array(
'Escaped text: @value',
array(
'@value' => '<script>',
),
'Escaped text: <script>',
'String::format replaces and escapes string.',
);
$tests[] = array(
'Placeholder text: %value',
array(
'%value' => '<script>',
),
'Placeholder text: <em class="placeholder"><script></em>',
'String::format replaces, escapes and themes string.',
);
$tests[] = array(
'Verbatim text: !value',
array(
'!value' => '<script>',
),
'Verbatim text: <script>',
'String::format replaces verbatim string as-is.',
);
return $tests;
}