protected function SmsFrameworkUserAccountRegistrationServiceTest::getLastUser in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::getLastUser()
- 2.1.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserAccountRegistrationServiceTest::getLastUser()
Count number of registered users.
Return value
\Drupal\user\UserInterface|null Get last created user, or NULL if no users in database.
4 calls to SmsFrameworkUserAccountRegistrationServiceTest::getLastUser()
- SmsFrameworkUserAccountRegistrationServiceTest::testIncomingPatternNoPlaceholders in modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php - Test if a user is created despite no placeholders.
- SmsFrameworkUserAccountRegistrationServiceTest::testIncomingPatternPlaceholders in modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php - Test all placeholders make their way into the user object.
- SmsFrameworkUserAccountRegistrationServiceTest::testUniqueUsername in modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php - Test unique username.
- SmsFrameworkUserAccountRegistrationServiceTest::testUnrecognisedCreateUser in modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php - Test user is created if a unrecognised phone number is used as sender.
File
- modules/
sms_user/ tests/ src/ Kernel/ SmsFrameworkUserAccountRegistrationServiceTest.php, line 551
Class
- SmsFrameworkUserAccountRegistrationServiceTest
- Tests account registration.
Namespace
Drupal\Tests\sms_user\KernelCode
protected function getLastUser() {
$users = User::loadMultiple();
return $users ? end($users) : NULL;
}