diff --git a/core/modules/aggregator/src/Tests/AddFeedTest.php b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php
similarity index 92%
rename from core/modules/aggregator/src/Tests/AddFeedTest.php
rename to core/modules/aggregator/tests/src/Functional/AddFeedTest.php
index b7ffe5fbc7..1b6857fb1b 100644
--- a/core/modules/aggregator/src/Tests/AddFeedTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php
@@ -1,6 +1,8 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
+
+use use Drupal\Tests\Traits\Core\MetaRefreshTrait;
 
 /**
  * Add feed test.
@@ -9,6 +11,8 @@
  */
 class AddFeedTest extends AggregatorTestBase {
 
+  use MetaRefreshTrait;
+
   protected function setUp() {
     parent::setUp();
 
@@ -60,7 +64,7 @@ public function testFeedLabelEscaping() {
     $this->assertNoRaw('Test feed title <script>alert(123);</script>');
 
     // Ensure the feed icon title is escaped.
-    $this->assertTrue(strpos(str_replace(["\n", "\r"], '', $this->getRawContent()), 'class="feed-icon">  Subscribe to Test feed title &lt;script&gt;alert(123);&lt;/script&gt; feed</a>') !== FALSE);
+    $this->assertTrue(strpos(str_replace(["\n", "\r"], '', $this->getSession()->getPage()->getContent()), 'class="feed-icon">  Subscribe to Test feed title &lt;script&gt;alert(123);&lt;/script&gt; feed</a>') !== FALSE);
   }
 
   /**
diff --git a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php
similarity index 83%
rename from core/modules/aggregator/src/Tests/AggregatorAdminTest.php
rename to core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php
index 487e0ef921..94ec742481 100644
--- a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Tests aggregator admin pages.
@@ -67,18 +67,21 @@ function testOverviewPage() {
     // Check if the amount of feeds in the overview matches the amount created.
     $this->assertEqual(1, count($result), 'Created feed is found in the overview');
     // Check if the fields in the table match with what's expected.
-    $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a);
+    $link = $this->xpath('//table/tbody/tr//td[1]/a');
+    $this->assertEquals($feed->label(), $link[0]->getText());
     $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed);
-    $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]);
+    $td = $this->xpath('//table/tbody/tr//td[2]');
+    $this->assertEquals(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), $td[0]->getText());
 
     // Update the items of the first feed.
     $feed->refreshItems();
     $this->drupalGet('admin/config/services/aggregator');
-    $result = $this->xpath('//table/tbody/tr');
     // Check if the fields in the table match with what's expected.
-    $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a);
+    $link = $this->xpath('//table/tbody/tr//td[1]/a');
+    $this->assertEquals($feed->label(), $link[0]->getText());
     $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed);
-    $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]);
+    $td = $this->xpath('//table/tbody/tr//td[2]');
+    $this->assertEquals(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), $td[0]->getText());
   }
 
 }
diff --git a/core/modules/aggregator/src/Tests/AggregatorCronTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
similarity index 93%
rename from core/modules/aggregator/src/Tests/AggregatorCronTest.php
rename to core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
index 34a4cb930c..37baa30ab8 100644
--- a/core/modules/aggregator/src/Tests/AggregatorCronTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
@@ -1,6 +1,8 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
+
+use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
  * Update feeds on cron.
@@ -8,6 +10,9 @@
  * @group aggregator
  */
 class AggregatorCronTest extends AggregatorTestBase {
+
+  use CronRunTrait;
+
   /**
    * Adds feeds and updates them via cron process.
    */
diff --git a/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
similarity index 91%
rename from core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
rename to core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
index 888f1da567..21e4f80504 100644
--- a/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\views\Entity\View;
@@ -132,10 +132,14 @@ public function testFeedPage() {
 
     // Check the opml aggregator page.
     $this->drupalGet('aggregator/opml');
-    $outline = $this->xpath('//outline[1]');
-    $this->assertEqual($outline[0]['type'], 'rss', 'The correct type attribute is used for rss OPML.');
-    $this->assertEqual($outline[0]['text'], $feed->label(), 'The correct text attribute is used for rss OPML.');
-    $this->assertEqual($outline[0]['xmlurl'], $feed->getUrl(), 'The correct xmlUrl attribute is used for rss OPML.');
+    $content = $this->getSession()->getPage()->getContent();
+    // We can't use Mink xpath queries here because it only supports HTML pages,
+    // but we are dealing with XML here.
+    $xml = simplexml_load_string($content);
+    $attributes = $xml->xpath('//outline[1]')[0]->attributes();
+    $this->assertEquals('rss', $attributes->type);
+    $this->assertEquals($feed->label(), $attributes->text);
+    $this->assertEquals($feed->getUrl(), $attributes->xmlUrl);
 
     // Check for the presence of a pager.
     $this->drupalGet('aggregator/sources/' . $feed->id());
diff --git a/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php b/core/modules/aggregator/tests/src/Functional/FeedAdminDisplayTest.php
similarity index 98%
rename from core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
rename to core/modules/aggregator/tests/src/Functional/FeedAdminDisplayTest.php
index 0324e3b9a5..9eb5cacab0 100644
--- a/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedAdminDisplayTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Tests the display of a feed on the Aggregator list page.
diff --git a/core/modules/aggregator/src/Tests/FeedLanguageTest.php b/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
similarity index 98%
rename from core/modules/aggregator/src/Tests/FeedLanguageTest.php
rename to core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
index af8335e10e..81f8b42e2f 100644
--- a/core/modules/aggregator/src/Tests/FeedLanguageTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 
diff --git a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
similarity index 98%
rename from core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
rename to core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
index ae78205bcd..c395db6bcb 100644
--- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
@@ -1,6 +1,7 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
+
 use Drupal\aggregator\Entity\Feed;
 
 /**
diff --git a/core/modules/aggregator/src/Tests/UpdateFeedTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
similarity index 97%
rename from core/modules/aggregator/src/Tests/UpdateFeedTest.php
rename to core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
index 8c797a5e82..bb830a5447 100644
--- a/core/modules/aggregator/src/Tests/UpdateFeedTest.php
+++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\aggregator\Tests;
+namespace Drupal\Tests\aggregator\Functional;
 
 /**
  * Update feed test.
