test.',
'',
'',
'This is test.',
[],
' not removed.',
],
[
'%Y-%m-%d %Y-%m-%d.',
'',
'',
date('Y-m-d') . ' %Y-%m-%d.',
[],
'Date replaced inside .',
],
[
'@@test@@ @@test@@.',
'textbox test',
'something',
'something @@test@@.',
[],
'Field value replaced inside .',
],
[
'@ID@ @USER@ @MAIL@',
'',
'',
'@ID@ @USER@ @MAIL@',
[],
'DokuWiki replacement paterns for templates replaced inside .',
],
[
'@FORMPAGE_ID@ @FORMPAGE_NS@ @FORMPAGE_CURNS@',
'',
'',
'@FORMPAGE_ID@ @FORMPAGE_NS@ @FORMPAGE_CURNS@',
[],
'@FORMPAGE_*@ replacement paterns replaced inside .',
],
[
'TEST',
'',
'',
'TEST',
[],
'noinclude tag inside .',
],
[
'@NSBASE@',
'',
'',
'@NSBASE@',
[],
'"@NSBASE@" replaced inside .',
],
[
'%%',
'',
'',
'%%',
[],
'"%%" replaced inside .',
]
];
}
/**
* @dataProvider dataProvider
*
* @param string $templateSyntax
* @param string $formSyntax
* @param string $postedValue
* @param string $expectedWikiText
* @param string $msg
*
*/
public function test_noreplace_tag(
$templateSyntax,
$formSyntax,
$postedValue,
$expectedWikiText,
$expectedValidationErrors,
$msg
) {
$actualValidationErrors = [];
$actualWikiText = parent::send_form_action_template(
$formSyntax,
$templateSyntax,
$actualValidationErrors,
$postedValue
);
if (empty($expectedValidationErrors)) {
$this->assertEquals($expectedWikiText, $actualWikiText, $msg);
}
$this->assertEquals($expectedValidationErrors, $actualValidationErrors, $msg);
}
}