You are here

protected function YamlFormElementManagedFileTest::getLastFileId in YAML Form 8

Retrieves the fid of the last inserted file.

2 calls to YamlFormElementManagedFileTest::getLastFileId()
YamlFormElementManagedFileTest::checkFileUpload in src/Tests/YamlFormElementManagedFileTest.php
Check file upload.
YamlFormElementManagedFileTest::testPrivateFiles in src/Tests/YamlFormElementManagedFileTest.php
Test private files.

File

src/Tests/YamlFormElementManagedFileTest.php, line 251

Class

YamlFormElementManagedFileTest
Test for form element managed file handling.

Namespace

Drupal\yamlform\Tests

Code

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