protected function FileManagedFileElementTest::getLastFileId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php \Drupal\Tests\file\FunctionalJavascript\FileManagedFileElementTest::getLastFileId()
- 9 core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php \Drupal\Tests\file\FunctionalJavascript\FileManagedFileElementTest::getLastFileId()
Retrieves the fid of the last inserted file.
File
- core/
modules/ file/ tests/ src/ FunctionalJavascript/ FileManagedFileElementTest.php, line 112
Class
- FileManagedFileElementTest
- Tests the 'managed_file' element type.
Namespace
Drupal\Tests\file\FunctionalJavascriptCode
protected function getLastFileId() {
return (int) \Drupal::entityQueryAggregate('file')
->accessCheck(FALSE)
->aggregate('fid', 'max')
->execute()[0]['fid_max'];
}