diff --git a/core/modules/history/src/Tests/Views/HistoryTimestampTest.php b/core/modules/history/src/Tests/Views/HistoryTimestampTest.php index 38b6fb3..f711d33 100644 --- a/core/modules/history/src/Tests/Views/HistoryTimestampTest.php +++ b/core/modules/history/src/Tests/Views/HistoryTimestampTest.php @@ -43,7 +43,7 @@ public function testHandlers() { $account = $this->drupalCreateUser(); $this->drupalLogin($account); - \Drupal::currentUser()->setCurrentUser($account); + \Drupal::currentUser()->setAccount($account); db_insert('history') ->fields(array( diff --git a/core/modules/user/src/Tests/Views/ArgumentDefaultTest.php b/core/modules/user/src/Tests/Views/ArgumentDefaultTest.php index 4a16236..f28565e 100644 --- a/core/modules/user/src/Tests/Views/ArgumentDefaultTest.php +++ b/core/modules/user/src/Tests/Views/ArgumentDefaultTest.php @@ -31,14 +31,14 @@ public function test_plugin_argument_default_current_user() { $this->drupalLogin($account); $admin = \Drupal::currentUser(); $session_manager = \Drupal::service('session_manager')->disable(); - \Drupal::currentUser()->setCurrentUser($account); + \Drupal::currentUser()->setAccount($account); $view = Views::getView('test_plugin_argument_default_current_user'); $view->initHandlers(); $this->assertEqual($view->argument['null']->getDefaultArgument(), $account->id(), 'Uid of the current user is used.'); // Switch back. - \Drupal::currentUser()->setCurrentUser($admin); + \Drupal::currentUser()->setAccount($admin); $session_manager->enable(); }