public function MultifieldFileUsageTestCase::assertFileUsage in Multifield 7
Same name and namespace in other branches
- 7.2 tests/MultifieldFileUsageTestCase.test \MultifieldFileUsageTestCase::assertFileUsage()
1 call to MultifieldFileUsageTestCase::assertFileUsage()
File
- tests/
MultifieldFileUsageTestCase.test, line 137
Class
Code
public function assertFileUsage($file, $module, $type, $id, $count) {
$usage = file_usage_list($file);
$actual_count = isset($usage[$module][$type][$id]) ? $usage[$module][$type][$id] : 0;
return $this
->assertEqual($actual_count, $count, "File usage for fid {$file->fid} on {$module}:{$type}:{$id} is {$actual_count}, expected {$count}.");
}