function CoderI18NTest::testI18NSpaces in Coder 6
Same name and namespace in other branches
- 6.2 tests/coder_i18n.test \CoderI18NTest::testI18NSpaces()
File
- tests/
coder_i18n.test, line 17
Class
Code
function testI18NSpaces() {
$this
->assertCoderPass(' $var = t("Your rating");');
$this
->assertCoderFail(' $var = t(" Your rating");');
$this
->assertCoderFail(' $var = t("Your rating ");');
$this
->assertCoderPass(' $var = t("Your rating") ."hello ";');
$this
->assertCoderPass(' $var = t("Your rating") ." hello";');
$this
->assertCoderPass(" \$var = t('Your rating');");
$this
->assertCoderFail(" \$var = t(' Your rating');");
$this
->assertCoderFail(" \$var = t('Your rating ');");
$this
->assertCoderPass(" \$var = t('Your rating') .'hello ';");
$this
->assertCoderPass(" \$var = t('Your rating') .' hello';");
$this
->assertCoderPass(" 'titleUser' => t('Your rating') .': ',");
$this
->assertCoderFail(" \$var = t('This isn't a false positive ');");
$this
->assertCoderFail(" \$var = t('This isn\\'t a \"false\" positive ');");
$this
->assertCoderPass(" \$var = t('This is a false positive') . implode(', ', \$array);");
$this
->assertCoderPass(" \$var = t('This is a \\'false\\\" positive');");
$this
->assertCoderPass(" \$var = t('This is a \"false\" positive');");
$this
->assertCoderPass(" \$var = t('Your rating') . t('pass');");
$this
->assertCoderFail(" \$var = t('Your rating') . t(' fail');");
$this
->assertCoderFail(" \$var = t('Your rating') . t('fail ');");
$this
->assertCoderFail(" \$var = t('Your rating') . t(' fail ');");
$this
->assertCoderFail(" \$var = t(' Your rating ') . t(' fail ');");
$this
->assertCoderFail(" \$var = t(' Your rating') . t('fail');");
$this
->assertCoderFail(" \$var = t('Your rating ') . t('fail');");
$this
->assertCoderFail(" \$var = t(' Your rating ') . t('fail');");
$this
->assertCoderFail(" \$var = t('Your rating ') . t('fail ');");
$this
->assertCoderFail(" \$var = t(' Your rating ') . t('fail ');");
$this
->assertCoderFail(" \$var = t('Your rating ') . t(' fail');");
$this
->assertCoderFail(" \$description[] = t('until !until ', array('!until' => date_format_date(\$until, 'custom', \$format)));");
$this
->assertCoderFail(" \$description[] = t('except !dates ', array('!dates' => implode(', ', \$values)));");
}