1 file.test FileTestHelper::getLastFileId()

Retrieves the fid of the last inserted file.

File

core/modules/file/tests/file.test, line 163
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();
}