function CoderReviewUpgrade7xTest::testFile7x in Coder 7.2
Same name and namespace in other branches
- 7 coder_review/tests/coder_review_7x.test \CoderReviewUpgrade7xTest::testFile7x()
???
File
- coder_review/
tests/ coder_review_7x.test, line 534
Class
Code
function testFile7x() {
// N/A - http://drupal.org/node/224333#file_load_multiple
// N/A - http://drupal.org/node/224333#file_check_directory_recursive
// UNCLEAR - http://drupal.org/node/224333#file_validate_extensions
// UNCLEAR - http://drupal.org/node/224333#file_scan_directory_property_names
// UNCLEAR - http://drupal.org/node/224333#unmanaged_files
// UNCLEAR - http://drupal.org/node/224333#user_picture
// http://drupal.org/node/224333#file_scan_directory_array-itize
$this
->assertCoderReviewPass(' file_scan_directory($dir, $mask);');
$this
->assertCoderReviewPass(' file_scan_directory($dir, $mask, $options, $depth);');
$this
->assertCoderReviewFail(' file_scan_directory($dir, $mask, $options, $callback, $recurse, $key, $min_depth, $depth);');
$this
->assertCoderReviewFail(' file_scan_directory($dir, $mask, $nomask);');
// http://drupal.org/node/224333#file_scan_directory_nomask
$this
->assertCoderReviewFail(" file_scan_directory(\$dir, \$mask, array('.', '..', 'CVS'));");
$this
->assertCoderReviewFail(" file_scan_directory(\$dir, \$mask, array('nomask' => array('.', '..', 'CVS')));");
// http://drupal.org/node/224333#file_set_status
$this
->assertCoderReviewFail(' file_set_status($file, FILE_STATUS_PERMANENT);');
$this
->assertCoderReviewPass(' myfile_set_status($file, FILE_STATUS_PERMANENT);');
// http://drupal.org/node/224333#remove_FILE_STATUS_TEMPORARY
$this
->assertCoderReviewFail(' $file->status = FILE_STATUS_TEMPORARY;');
// http://drupal.org/node/224333#preg_match
$this
->assertCoderReviewPass(" file_scan_directory(\$dir, '/\\.module\$/');");
$this
->assertCoderReviewFail(" file_scan_directory(\$dir, '\\.module\$');");
$this
->assertCoderReviewPass(" \$files = drupal_system_listing('/\\.module\$/', 'modules', 'name', 0);");
$this
->assertCoderReviewFail(" \$files = drupal_system_listing('\\.module\$', 'modules', 'name', 0);");
}