function FileFieldTestBase::getLastFileId in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/src/Tests/FileFieldTestBase.php \Drupal\file\Tests\FileFieldTestBase::getLastFileId()
Retrieves the fid of the last inserted file.
3 calls to FileFieldTestBase::getLastFileId()
- FileManagedFileElementTest::testManagedFile in core/
modules/ file/ src/ Tests/ FileManagedFileElementTest.php - Tests the managed_file element type.
- FileManagedFileElementTest::testManagedFileRemoved in core/
modules/ file/ src/ Tests/ FileManagedFileElementTest.php - Ensure that warning is shown if file on the field has been removed.
- PrivateFileOnTranslatedEntityTest::testPrivateLanguageFile in core/
modules/ file/ src/ Tests/ PrivateFileOnTranslatedEntityTest.php - Tests private file fields on translated nodes.
File
- core/
modules/ file/ src/ Tests/ FileFieldTestBase.php, line 59 - Contains \Drupal\file\Tests\FileFieldTestBase.
Class
- FileFieldTestBase
- Provides methods specifically for testing File module's field handling.
Namespace
Drupal\file\TestsCode
function getLastFileId() {
return (int) db_query('SELECT MAX(fid) FROM {file_managed}')
->fetchField();
}