Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/user/tests/src/Functional/UserEditedOwnAccountTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\user\Functional; | 3 namespace Drupal\Tests\user\Functional; |
4 | 4 |
5 use Drupal\Tests\BrowserTestBase; | 5 use Drupal\Tests\BrowserTestBase; |
6 use Drupal\user\UserInterface; | |
6 | 7 |
7 /** | 8 /** |
8 * Tests user edited own account can still log in. | 9 * Tests user edited own account can still log in. |
9 * | 10 * |
10 * @group user | 11 * @group user |
12 class UserEditedOwnAccountTest extends BrowserTestBase { | 13 class UserEditedOwnAccountTest extends BrowserTestBase { |
13 | 14 |
14 public function testUserEditedOwnAccount() { | 15 public function testUserEditedOwnAccount() { |
15 // Change account setting 'Who can register accounts?' to Administrators | 16 // Change account setting 'Who can register accounts?' to Administrators |
16 // only. | 17 // only. |
17 $this->config('user.settings')->set('register', USER_REGISTER_ADMINISTRATORS_ONLY)->save(); | 18 $this->config('user.settings')->set('register', UserInterface::REGISTER_ADMINISTRATORS_ONLY)->save(); |
18 | 19 |
19 // Create a new user account and log in. | 20 // Create a new user account and log in. |
20 $account = $this->drupalCreateUser(['change own username']); | 21 $account = $this->drupalCreateUser(['change own username']); |
21 $this->drupalLogin($account); | 22 $this->drupalLogin($account); |
22 | 23 |