function RegistrationTestCase::entityLastId in Entity Registration 8.2
Same name in this branch
- 8.2 tests/registration.test \RegistrationTestCase::entityLastId()
- 8.2 src/RegistrationTestCase.php \Drupal\registration\RegistrationTestCase::entityLastId()
1 call to RegistrationTestCase::entityLastId()
- RegistrationStandardTestCase::testRegistrationForm in src/
RegistrationStandardTestCase.php - Tests for the registration add/edit form.
File
- src/
RegistrationTestCase.php, line 69 - Tests for the Registration module
Class
- RegistrationTestCase
- @file Tests for the Registration module
Namespace
Drupal\registrationCode
function entityLastId($entity_type) {
$query = new EntityFieldQuery();
$result = $query
->entityCondition('entity_type', $entity_type)
->entityOrderBy('entity_id', 'DESC')
->range(0, 1)
->execute();
return key($result[$entity_type]);
}