You are here

function CoderReviewI18NTest::testI18NSpaces in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_review/tests/coder_review_i18n.test \CoderReviewI18nTest::testI18NSpaces()

File

coder_review/tests/coder_review_i18n.test, line 22

Class

CoderReviewI18NTest

Code

function testI18NSpaces() {
  $this
    ->assertCoderReviewPass('  $var = t("Your rating");');
  $this
    ->assertCoderReviewFail('  $var = t(" Your rating");');
  $this
    ->assertCoderReviewFail('  $var = t("Your rating ");');
  $this
    ->assertCoderReviewPass('  $var = t("Your rating") ."hello ";');
  $this
    ->assertCoderReviewPass('  $var = t("Your rating") ." hello";');
  $this
    ->assertCoderReviewPass("  \$var = t('Your rating');");
  $this
    ->assertCoderReviewFail("  \$var = t(' Your rating');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating ');");
  $this
    ->assertCoderReviewPass("  \$var = t('Your rating') .'hello ';");
  $this
    ->assertCoderReviewPass("  \$var = t('Your rating') .' hello';");
  $this
    ->assertCoderReviewPass("  'titleUser' => t('Your rating') .': ',");
  $this
    ->assertCoderReviewFail("  \$var = t('This isn't a false positive ');");
  $this
    ->assertCoderReviewFail("  \$var = t('This isn\\'t a \"false\" positive ');");
  $this
    ->assertCoderReviewPass("  \$var = t('This is a false positive') . implode(', ', \$array);");
  $this
    ->assertCoderReviewPass("  \$var = t('This is a \\'false\\\" positive');");
  $this
    ->assertCoderReviewPass("  \$var = t('This is a \"false\" positive');");
  $this
    ->assertCoderReviewPass("  \$var = t('Your rating') . t('pass');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating') . t(' fail');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating') . t('fail ');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating') . t(' fail ');");
  $this
    ->assertCoderReviewFail("  \$var = t(' Your rating ') . t(' fail ');");
  $this
    ->assertCoderReviewFail("  \$var = t(' Your rating') . t('fail');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating ') . t('fail');");
  $this
    ->assertCoderReviewFail("  \$var = t(' Your rating ') . t('fail');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating ') . t('fail ');");
  $this
    ->assertCoderReviewFail("  \$var = t(' Your rating ') . t('fail ');");
  $this
    ->assertCoderReviewFail("  \$var = t('Your rating ') . t(' fail');");
  $this
    ->assertCoderReviewFail("  \$description[] = t('until !until ', array('!until' => date_format_date(\$until, 'custom', \$format)));");
  $this
    ->assertCoderReviewFail("  \$description[] = t('except !dates ', array('!dates' => implode(', ', \$values)));");
}