function FileFieldTestCase::getLastFileId
Retrieves the fid of the last inserted file.
1 call to FileFieldTestCase::getLastFileId()
- FileManagedFileElementTestCase::testManagedFile in modules/
file/ tests/ file.test - Tests the managed_file element type.
File
-
modules/
file/ tests/ file.test, line 45
Class
- FileFieldTestCase
- Provides methods specifically for testing File module's field handling.
Code
function getLastFileId() {
return (int) db_query('SELECT MAX(fid) FROM {file_managed}')->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.