1.20.x file.test | FileTestHelper::getLastFileId() |
Retrieves the fid of the last inserted file.
File
- modules/
file/ tests/ file.test, line 153 - Tests for file.module.
Class
- FileTestHelper
- Provides methods specifically for testing File module's field handling.
Code
function getLastFileId() {
return (int) db_query('SELECT MAX(fid) FROM {file_managed}')->fetchField();
}