t('Coder I18N Tests'), 'description' => t('Tests for the coder I18N review.'), 'group' => t('Coder'), ); } 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)));"); } }