You are here

function MediaLibraryTestHelper::getLastFileId in Media Library 7

Retrieves the fid of the last inserted file.

1 call to MediaLibraryTestHelper::getLastFileId()
MediaLibraryUploadWizardTestCase::testMediaLibraryUploadWizardCheckbox in ./media_library.test
Test the file upload wizard 'add to library' checkbox.

File

./media_library.test, line 34
Test integration for the Media Library module.

Class

MediaLibraryTestHelper
@file Test integration for the Media Library module.

Code

function getLastFileId() {
  return (int) db_query('SELECT MAX(fid) FROM {file_managed}')
    ->fetchField();
}