function potx_test_8_example in Translation template extractor 6.3
Same name and namespace in other branches
- 7.2 tests/potx_test_8.module \potx_test_8_example()
Plugin annotation
@TestAnnotation(
id = "test_annotation",
test_label = @Translation("Good translation annotation"),
test_label_context = @Translation("Translation in good context", context="Translation test")
)
File
- tests/
potx_test_8.module, line 15 - File used purely to test the parser in potx.
Code
function potx_test_8_example() {
$a = new TranslationWrapper('TranslationWrapper string');
$b = new TranslationWrapper('TranslationWrapper string with context', array(), array(
'context' => 'With context',
));
$a = new TranslatableMarkup('TranslatableMarkup string');
$b = new TranslatableMarkup('TranslatableMarkup string with context', array(), array(
'context' => 'With context',
));
$a
->debug('Debug message');
$b
->info('Info message');
$c
->notice('Notice message');
$d
->warning('Warning message');
$e
->error('Error message');
$f
->critical('Critical message');
$g
->alert('Alert message');
$h
->emergency('Emergency message');
$i
->log(1, 'Log message');
$j
->log('false positive');
$k
->log($boo, 'Log message 2');
$l
->log($another_false_positive);
$m
->log(potx_test_8_sample(), 'Log message 3');
$n
->log();
}