You are here

function CoderUpgrade6xTest::testUpgrade6xFile in Coder 6.2

Same name and namespace in other branches
  1. 6 tests/coder_6x.test \CoderUpgrade6xTest::testUpgrade6xFile()

File

tests/coder_6x.test, line 113

Class

CoderUpgrade6xTest

Code

function testUpgrade6xFile() {
  $this
    ->assertCoderFail('  if ($file = file_check_upload(\'picture_upload\')) {');
  $this
    ->assertCoderFail('  $file = file_save_upload(\'picture_upload\', $destination, FILE_EXISTS_REPLACE); ');
  $this
    ->assertCoderFail('  $file = file_save_upload(\'picture_upload\', $dest); ');
  $this
    ->assertCoderFail('  $file = file_save_upload(\'picture_upload\', \'abc\'); ');
  $this
    ->assertCoderFail('  $file = file_save_upload(\'picture_upload\', "abc"); ');
  $this
    ->assertCoderPass('  $file = file_save_upload(\'picture_upload\', array(\'foo\')); ');
  $this
    ->assertCoderPass('  if ($file = file_save_upload(\'picture_upload\', $validators, $dest)) {');
  $this
    ->assertCoderFail('  $sql = \'UPDATE {file_revisions} SET vid=1');
  $this
    ->assertCoderFail('  if (db_query(\'SELECT * FROM {file_revisions}\')) {');
}