protected function WebformElementManagedFileTestBase::getLastFileId in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Functional/Element/WebformElementManagedFileTestBase.php \Drupal\Tests\webform\Functional\Element\WebformElementManagedFileTestBase::getLastFileId()
Retrieves the fid of the last inserted file.
6 calls to WebformElementManagedFileTestBase::getLastFileId()
- WebformCompositeCustomFileTest::testCustom in tests/
src/ Functional/ Composite/ WebformCompositeCustomFileTest.php - Test custom composite element.
- WebformCompositePluginFileTest::testPlugin in tests/
src/ Functional/ Composite/ WebformCompositePluginFileTest.php - Test composite plugin.
- WebformElementManagedFilePrivateTest::testPrivateFiles in tests/
src/ Functional/ Element/ WebformElementManagedFilePrivateTest.php - Test private files.
- WebformElementManagedFileTest::checkFileUpload in tests/
src/ Functional/ Element/ WebformElementManagedFileTest.php - Check file upload.
- WebformElementManagedFileTest::testFileUploadWithDisabledResults in tests/
src/ Functional/ Element/ WebformElementManagedFileTest.php - Test file upload with disabled results.
File
- tests/
src/ Functional/ Element/ WebformElementManagedFileTestBase.php, line 51
Class
- WebformElementManagedFileTestBase
- Base class for testing webform element managed file handling.
Namespace
Drupal\Tests\webform\Functional\ElementCode
protected function getLastFileId() {
return (int) \Drupal::database()
->query('SELECT MAX(fid) FROM {file_managed}')
->fetchField();
}