You are here

function FileFieldPathsTestCase::checkFilePath in File (Field) Paths 6

Same name and namespace in other branches
  1. 6.2 tests/filefield_paths.test \FileFieldPathsTestCase::checkFilePath()
2 calls to FileFieldPathsTestCase::checkFilePath()
FileFieldPathsUploadTestCase::testUploadFile in tests/filefield_paths.test
Test file upload.
filefield_paths.test in tests/filefield_paths.test
This file implements tests for FileField Paths.

File

tests/filefield_paths.test, line 68
This file implements tests for FileField Paths.

Class

FileFieldPathsTestCase
@file This file implements tests for FileField Paths.

Code

function checkFilePath($file, $node, $retroactive = FALSE) {
  $filepath = file_directory_path() . '/node/' . $node->nid . '/' . $file['filename'];
  $message = t('Make sure filepath has been processed.');
  if ($retroactive) {
    $filename = $filepath = file_directory_path() . '/retroactive-node/' . $node->nid . '/' . $file['filename'];
    $message = t('Make sure filepath has been retroactively processed.');
  }
  $this
    ->assertEqual($file['filepath'], $filepath, $message, 'FileField Paths');
}