protected function UpdatePathTestBase::replaceUser1 in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php \Drupal\FunctionalTests\Update\UpdatePathTestBase::replaceUser1()
- 8 core/modules/system/src/Tests/Update/UpdatePathTestBase.php \Drupal\system\Tests\Update\UpdatePathTestBase::replaceUser1()
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php \Drupal\FunctionalTests\Update\UpdatePathTestBase::replaceUser1()
Replace User 1 with the user created here.
1 call to UpdatePathTestBase::replaceUser1()
- UpdatePathTestBase::setUp in core/
tests/ Drupal/ FunctionalTests/ Update/ UpdatePathTestBase.php - Overrides WebTestBase::setUp() for update testing.
6 methods override UpdatePathTestBase::replaceUser1()
- MenuLinkContentUpdateTest::replaceUser1 in core/
modules/ menu_link_content/ tests/ src/ Functional/ Update/ MenuLinkContentUpdateTest.php - Replace User 1 with the user created here.
- TaxonomyTermParentMultilingualTest::replaceUser1 in core/
modules/ taxonomy/ tests/ src/ Functional/ Update/ TaxonomyTermParentMultilingualTest.php - Replace User 1 with the user created here.
- TaxonomyTermUpdatePathTest::replaceUser1 in core/
modules/ taxonomy/ tests/ src/ Functional/ Update/ TaxonomyTermUpdatePathTest.php - Replace User 1 with the user created here.
- UpdatePathRC1TestBaseFilledTest::replaceUser1 in core/
modules/ system/ tests/ src/ Functional/ Update/ UpdatePathRC1TestBaseFilledTest.php - Replace User 1 with the user created here.
- UpdatePathTestBaseFilledTest::replaceUser1 in core/
modules/ system/ tests/ src/ Functional/ UpdateSystem/ UpdatePathTestBaseFilledTest.php - Replace User 1 with the user created here.
File
- core/
tests/ Drupal/ FunctionalTests/ Update/ UpdatePathTestBase.php, line 327
Class
- UpdatePathTestBase
- Provides a base class for writing an update test.
Namespace
Drupal\FunctionalTests\UpdateCode
protected function replaceUser1() {
/** @var \Drupal\user\UserInterface $account */
// @todo: Saving the account before the update is problematic.
// https://www.drupal.org/node/2560237
$account = User::load(1);
$account
->setPassword($this->rootUser->pass_raw);
$account
->setEmail($this->rootUser
->getEmail());
$account
->setUsername($this->rootUser
->getAccountName());
$account
->save();
}