function CoderReviewUpgrade7xTest::testInput7x in Coder 7
Same name and namespace in other branches
- 7.2 coder_review/tests/coder_review_7x.test \CoderReviewUpgrade7xTest::testInput7x()
File
- coder_review/
tests/ coder_review_7x.test, line 288
Class
Code
function testInput7x() {
// http://drupal.org/node/224333#check_markup_params
$this
->assertCoderReviewFail(' check_markup($body, $format, $check);');
$this
->assertCoderReviewFail(' check_markup($body, $format, FALSE);');
$this
->assertCoderReviewFail(' check_markup($body, $format, TRUE);');
$this
->assertCoderReviewPass(' check_markup($body, $format, $langcode);');
$this
->assertCoderReviewPass(' check_markup($body, $format, "en");');
$this
->assertCoderReviewPass(' check_markup($body, $format, $langcode, FALSE);');
$this
->assertCoderReviewPass(' check_markup($body, $format);');
// http://drupal.org/node/224333#drupal_set_title
$this
->assertCoderReviewFail(' drupal_set_title(check_plain($text));');
$this
->assertCoderReviewPass(' drupal_set_title($text);');
$this
->assertCoderReviewFail(' drupal_set_title(t("%test"));');
$this
->assertCoderReviewFail(' drupal_set_title(t("@test"));');
$this
->assertCoderReviewFail(' drupal_set_title(t("foo %test"));');
$this
->assertCoderReviewFail(' drupal_set_title(t("foo @test"));');
$this
->assertCoderReviewPass(' drupal_set_title(t("test @ 10"));');
$this
->assertCoderReviewPass(' drupal_set_title(t("test 10% foo"));');
$this
->assertCoderReviewPass(' drupal_set_title(t("%test"), PASS_THROUGH);');
$this
->assertCoderReviewPass(' drupal_set_title(t("@test"), PASS_THROUGH);');
$this
->assertCoderReviewPass(' drupal_set_title(t("test"));');
// http://drupal.org/node/224333#hook_filter_info
$this
->assertCoderReviewFail(' function mymodule_filter($op, $delta = 0, $format = -1, $text = \'\')');
$this
->assertCoderReviewFail(' function mymodule_filter_tips($delta, $format, $long = FALSE)');
$this
->assertCoderReviewPass(' function mymodule_filter_info()');
// http://drupal.org/node/224333#text_format
$this
->assertCoderReviewFail(' $form[\'format\'] = filter_form($edit[\'format\']);');
$this
->assertCoderReviewFail(' $form[\'comment\'][\'filter\'] = filter_form(FILTER_FORMAT_DEFAULT);');
$this
->assertCoderReviewPass(' $format = filter_form();');
// http://drupal.org/node/224333#filter_urls
$this
->assertCoderReviewFail(' $url = url("admin/settings/filters");');
$this
->assertCoderReviewFail(' $url = url("admin/settings/filters/add");');
$this
->assertCoderReviewPass(' $url = url("admin/settings/filter");');
$this
->assertCoderReviewPass(' $url = url("admin/settings/filter/add");');
// http://drupal.org/node/224333#default-text-formats
// http://drupal.org/node/224333#text-format-permissions
// http://drupal.org/node/224333#filter-formats-parameters
}