diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/tests/src/Functional/UserCancelTest.php
similarity index 99%
rename from core/modules/user/src/Tests/UserCancelTest.php
rename to core/modules/user/tests/src/Functional/UserCancelTest.php
index a74626e..93fab57 100644
--- a/core/modules/user/src/Tests/UserCancelTest.php
+++ b/core/modules/user/tests/src/Functional/UserCancelTest.php
@@ -1,11 +1,11 @@
 <?php

-namespace Drupal\user\Tests;
+namespace Drupal\Tests\user\Functional;

-use Drupal\comment\Tests\CommentTestTrait;
-use Drupal\simpletest\WebTestBase;
 use Drupal\comment\CommentInterface;
 use Drupal\comment\Entity\Comment;
+use Drupal\comment\Tests\CommentTestTrait;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\user\Entity\User;

 /**
@@ -13,7 +13,7 @@
  *
  * @group user
  */
-class UserCancelTest extends WebTestBase {
+class UserCancelTest extends BrowserTestBase {

   use CommentTestTrait;

@@ -577,7 +577,7 @@ public function testMassUserCancelByAdmin() {
     $this->drupalPostForm(NULL, NULL, t('Cancel accounts'));
     $status = TRUE;
     foreach ($users as $account) {
-      $status = $status && (strpos($this->content, $account->getUsername() . '</em> has been deleted.') !== FALSE);
+      $status = $status && (strpos($this->getTextContent(), $account->getUsername() . ' has been deleted.') !== FALSE);
       $user_storage->resetCache([$account->id()]);
       $status = $status && !$user_storage->load($account->id());
     }
