You are here

function FileSpaceUsedTest::testUserAndStatus in SimpleTest 7

Test both the user and status.

File

tests/file.test, line 326
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Class

FileSpaceUsedTest
This will run tests against the file_space_used() function.

Code

function testUserAndStatus() {
  $this
    ->assertEqual(file_space_used(1, 8), 0, t("Found the size of the admin user's files with status 8."));
  $this
    ->assertEqual(file_space_used(2, 8), 1, t("Found the size of the first user's files with status 8."));
  $this
    ->assertEqual(file_space_used(2, 2), 1, t("Found the size of the first user's files with status 2."));
  $this
    ->assertEqual(file_space_used(3, 2), 3, t("Found the size of the second user's files with status 2."));
}