Commit 0a4d2b55 authored by webchick's avatar webchick

Revert "Issue #2263339 by damiankloip, blueminds, mgifford, xjm, almaudoh,...

Revert "Issue #2263339 by damiankloip, blueminds, mgifford, xjm, almaudoh, mitrpaka, znerol, dawehner: Fix all current_user set calls"

Does not use new API yet.

This reverts commit b422ee7f.
parent b422ee7f
......@@ -8,7 +8,6 @@
namespace Drupal\system\Tests\Form;
use Drupal\Core\Form\FormState;
use Drupal\Core\Session\AnonymousUserSession;
use Drupal\Core\Session\UserSession;
use Drupal\simpletest\KernelTestBase;
......@@ -89,8 +88,7 @@ function testCacheToken() {
* Tests the form cache without a logged-in user.
function testNoCacheToken() {
$current_user = $this->container->get('current_user');
$current_user->setAccount(new AnonymousUserSession());
$this->container->set('current_user', new UserSession(array('uid' => 0)));
$this->form_state->set('example', $this->randomMachineName());
\Drupal::formBuilder()->setCache($this->form_build_id, $this->form, $this->form_state);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment