protected function ImageFieldTestBase::getLastFileId in Drupal 8
Same name in this branch
- 8 core/modules/image/src/Tests/ImageFieldTestBase.php \Drupal\image\Tests\ImageFieldTestBase::getLastFileId()
- 8 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase::getLastFileId()
Same name and namespace in other branches
- 9 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase::getLastFileId()
Retrieves the fid of the last inserted file.
1 call to ImageFieldTestBase::getLastFileId()
- ImageOnTranslatedEntityTest::testSyncedImages in core/
modules/ image/ tests/ src/ Functional/ ImageOnTranslatedEntityTest.php - Tests synced file fields on translated nodes.
File
- core/
modules/ image/ tests/ src/ Functional/ ImageFieldTestBase.php, line 118
Class
- ImageFieldTestBase
- This class provides methods specifically for testing Image's field handling.
Namespace
Drupal\Tests\image\FunctionalCode
protected function getLastFileId() {
return (int) \Drupal::entityQueryAggregate('file')
->aggregate('fid', 'max')
->execute()[0]['fid_max'];
}