diff -u b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php --- b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php @@ -54,7 +54,6 @@ * Test the internal browsers functionality. */ function testInternalBrowser() { - global $conf; if (!$this->inCURL()) { // Retrieve the test page and check its title and headers. $this->drupalGet('test-page'); @@ -64,11 +63,11 @@ ))); $this->assertNoTitle('Foo'); - $current_user = $this->container->get('current_user')->id(); + $old_user_id = $this->container->get('current_user')->id(); $user = $this->drupalCreateUser(); $this->drupalLogin($user); // Check that current user service updated. - $this->assertNotEqual($current_user, $this->container->get('current_user')->id(), 'Current user service updated.'); + $this->assertNotEqual($old_user_id, $this->container->get('current_user')->id(), 'Current user service updated.'); $headers = $this->drupalGetHeaders(TRUE); $this->assertEqual(count($headers), 2, 'There was one intermediate request.'); $this->assertTrue(strpos($headers[0][':status'], '302') !== FALSE, 'Intermediate response code was 302.'); @@ -79,7 +78,7 @@ // Test the maximum redirection option. $this->drupalLogout(); - // Check that current user service updated. + // Check that current user service updated to anonymous user. $this->assertEqual(0, $this->container->get('current_user')->id(), 'Current user service updated.'); $edit = array( 'name' => $user->getUsername(), @@ -99,7 +98,6 @@ global $base_url; $this->drupalGet(url($base_url . '/core/install.php', array('external' => TRUE, 'absolute' => TRUE))); $this->assertResponse(403, 'Cannot access install.php.'); - } }