Test different users with the default status.
function testFileSpaceUsed() {
$file = entity_get_controller('file');
// Test different users with default status.
$this
->assertEqual($file
->spaceUsed(2), 70);
$this
->assertEqual($file
->spaceUsed(3), 300);
$this
->assertEqual($file
->spaceUsed(), 370);
// Test the status fields
$this
->assertEqual($file
->spaceUsed(NULL, 0), 4);
$this
->assertEqual($file
->spaceUsed(NULL, FILE_STATUS_PERMANENT), 370);
// Test both the user and status.
$this
->assertEqual($file
->spaceUsed(1, 0), 0);
$this
->assertEqual($file
->spaceUsed(1, FILE_STATUS_PERMANENT), 0);
$this
->assertEqual($file
->spaceUsed(2, 0), 1);
$this
->assertEqual($file
->spaceUsed(2, FILE_STATUS_PERMANENT), 70);
$this
->assertEqual($file
->spaceUsed(3, 0), 3);
$this
->assertEqual($file
->spaceUsed(3, FILE_STATUS_PERMANENT), 300);
}