You are here

public function RegistrationTestCase::entityLastId in Entity Registration 8

File

src/Tests/RegistrationTestCase.php, line 68
Tests for the Registration module

Class

RegistrationTestCase
@file Tests for the Registration module

Namespace

Drupal\registration\Tests

Code

public 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]);
}