diff --git a/core/modules/aggregator/src/Tests/FeedLanguageTest.php b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
index 1f48bb1..e69de29 100644
--- a/core/modules/aggregator/src/Tests/FeedLanguageTest.php
+++ b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
@@ -1,86 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\aggregator\Tests\FeedLanguageTest.
- */
-
-namespace Drupal\aggregator\Tests;
-
-use Drupal\language\Entity\ConfigurableLanguage;
-
-/**
- * Tests aggregator feeds in multiple languages.
- *
- * @group aggregator
- */
-class FeedLanguageTest extends AggregatorTestBase {
-
-  /**
-   * Modules to install.
-   *
-   * @var array
-   */
-  public static $modules = array('language');
-
-  /**
-   * List of langcodes.
-   *
-   * @var string[]
-   */
-  protected $langcodes = array();
-
-  protected function setUp() {
-    parent::setUp();
-
-    // Create test languages.
-    $this->langcodes = array(ConfigurableLanguage::load('en'));
-    for ($i = 1; $i < 3; ++$i) {
-      $language = ConfigurableLanguage::create(array(
-        'id' => 'l' . $i,
-        'label' => $this->randomString(),
-      ));
-      $language->save();
-      $this->langcodes[$i] = $language->id();
-    }
-  }
-
-  /**
-   * Tests creation of feeds with a language.
-   */
-  public function testFeedLanguage() {
-    $admin_user = $this->drupalCreateUser(['administer languages', 'access administration pages', 'administer news feeds', 'access news feeds', 'create article content']);
-    $this->drupalLogin($admin_user);
-
-    // Enable language selection for feeds.
-    $edit['entity_types[aggregator_feed]'] = TRUE;
-    $edit['settings[aggregator_feed][aggregator_feed][settings][language][language_alterable]'] = TRUE;
-
-    $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
-
-    /** @var \Drupal\aggregator\FeedInterface[] $feeds */
-    $feeds = array();
-    // Create feeds.
-    $feeds[1] = $this->createFeed(NULL, array('langcode[0][value]' => $this->langcodes[1]));
-    $feeds[2] = $this->createFeed(NULL, array('langcode[0][value]' => $this->langcodes[2]));
-
-    // Make sure that the language has been assigned.
-    $this->assertEqual($feeds[1]->language()->getId(), $this->langcodes[1]);
-    $this->assertEqual($feeds[2]->language()->getId(), $this->langcodes[2]);
-
-    // Create example nodes to create feed items from and then update the feeds.
-    $this->createSampleNodes();
-    $this->cronRun();
-
-    // Loop over the created feed items and verify that their language matches
-    // the one from the feed.
-    foreach ($feeds as $feed) {
-      /** @var \Drupal\aggregator\ItemInterface[] $items */
-      $items = entity_load_multiple_by_properties('aggregator_item', array('fid' => $feed->id()));
-      $this->assertTrue(count($items) > 0, 'Feed items were created.');
-      foreach ($items as $item) {
-        $this->assertEqual($item->language()->getId(), $feed->language()->getId());
-      }
-    }
-  }
-}
diff --git a/core/modules/book/src/Tests/BookTest.php b/core/modules/book/src/Tests/BookTest.php
index 330687d..e69de29 100644
--- a/core/modules/book/src/Tests/BookTest.php
+++ b/core/modules/book/src/Tests/BookTest.php
@@ -1,723 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\book\Tests\BookTest.
- */
-
-namespace Drupal\book\Tests;
-
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Create a book, add pages, and test book interface.
- *
- * @group book
- */
-class BookTest extends WebTestBase {
-
-  /**
-   * Modules to install.
-   *
-   * @var array
-   */
-  public static $modules = array('book', 'block', 'node_access_test');
-
-  /**
-   * A book node.
-   *
-   * @var object
-   */
-  protected $book;
-
-  /**
-   * A user with permission to create and edit books.
-   *
-   * @var object
-   */
-  protected $bookAuthor;
-
-  /**
-   * A user with permission to view a book and access printer-friendly version.
-   *
-   * @var object
-   */
-  protected $webUser;
-
-  /**
-   * A user with permission to create and edit books and to administer blocks.
-   *
-   * @var object
-   */
-  protected $adminUser;
-
-  /**
-   * A user without the 'node test view' permission.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $webUserWithoutNodeAccess;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->drupalPlaceBlock('system_breadcrumb_block');
-
-    // node_access_test requires a node_access_rebuild().
-    node_access_rebuild();
-
-    // Create users.
-    $this->bookAuthor = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books'));
-    $this->webUser = $this->drupalCreateUser(array('access printer-friendly version', 'node test view'));
-    $this->webUserWithoutNodeAccess = $this->drupalCreateUser(array('access printer-friendly version'));
-    $this->adminUser = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books', 'administer blocks', 'administer permissions', 'administer book outlines', 'node test view', 'administer content types', 'administer site configuration'));
-  }
-
-  /**
-   * Creates a new book with a page hierarchy.
-   */
-  function createBook() {
-    // Create new book.
-    $this->drupalLogin($this->bookAuthor);
-
-    $this->book = $this->createBookNode('new');
-    $book = $this->book;
-
-    /*
-     * Add page hierarchy to book.
-     * Book
-     *  |- Node 0
-     *   |- Node 1
-     *   |- Node 2
-     *  |- Node 3
-     *  |- Node 4
-     */
-    $nodes = array();
-    $nodes[] = $this->createBookNode($book->id()); // Node 0.
-    $nodes[] = $this->createBookNode($book->id(), $nodes[0]->book['nid']); // Node 1.
-    $nodes[] = $this->createBookNode($book->id(), $nodes[0]->book['nid']); // Node 2.
-    $nodes[] = $this->createBookNode($book->id()); // Node 3.
-    $nodes[] = $this->createBookNode($book->id()); // Node 4.
-
-    $this->drupalLogout();
-
-    return $nodes;
-  }
-
-  /**
-   * Tests saving the book outline on an empty book.
-   */
-  function testEmptyBook() {
-    // Create a new empty book.
-    $this->drupalLogin($this->bookAuthor);
-    $book = $this->createBookNode('new');
-    $this->drupalLogout();
-
-    // Log in as a user with access to the book outline and save the form.
-    $this->drupalLogin($this->adminUser);
-    $this->drupalPostForm('admin/structure/book/' . $book->id(), array(), t('Save book pages'));
-    $this->assertText(t('Updated book @book.', array('@book' => $book->label())));
-  }
-
-  /**
-   * Tests book functionality through node interfaces.
-   */
-  function testBook() {
-    // Create new book.
-    $nodes = $this->createBook();
-    $book = $this->book;
-
-    $this->drupalLogin($this->webUser);
-
-    // Check that book pages display along with the correct outlines and
-    // previous/next links.
-    $this->checkBookNode($book, array($nodes[0], $nodes[3], $nodes[4]), FALSE, FALSE, $nodes[0], array());
-    $this->checkBookNode($nodes[0], array($nodes[1], $nodes[2]), $book, $book, $nodes[1], array($book));
-    $this->checkBookNode($nodes[1], NULL, $nodes[0], $nodes[0], $nodes[2], array($book, $nodes[0]));
-    $this->checkBookNode($nodes[2], NULL, $nodes[1], $nodes[0], $nodes[3], array($book, $nodes[0]));
-    $this->checkBookNode($nodes[3], NULL, $nodes[2], $book, $nodes[4], array($book));
-    $this->checkBookNode($nodes[4], NULL, $nodes[3], $book, FALSE, array($book));
-
-    $this->drupalLogout();
-    $this->drupalLogin($this->bookAuthor);
-    /*
-     * Add Node 5 under Node 3.
-     * Book
-     *  |- Node 0
-     *   |- Node 1
-     *   |- Node 2
-     *  |- Node 3
-     *   |- Node 5
-     *  |- Node 4
-     */
-
-
-    $nodes[] = $this->createBookNode($book->id(), $nodes[3]->book['nid']); // Node 5.
-    $this->drupalLogout();
-    $this->drupalLogin($this->webUser);
-    // Verify the new outline - make sure we don't get stale cached data.
-    $this->checkBookNode($nodes[3], array($nodes[5]), $nodes[2], $book, $nodes[5], array($book));
-    $this->checkBookNode($nodes[4], NULL, $nodes[5], $book, FALSE, array($book));
-    $this->drupalLogout();
-    // Create a second book, and move an existing book page into it.
-    $this->drupalLogin($this->bookAuthor);
-    $other_book = $this->createBookNode('new');
-    $node = $this->createBookNode($book->id());
-    $edit = array('book[bid]' => $other_book->id());
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
-
-    $this->drupalLogout();
-    $this->drupalLogin($this->webUser);
-
-    // Check that the nodes in the second book are displayed correctly.
-    // First we must set $this->book to the second book, so that the
-    // correct regex will be generated for testing the outline.
-    $this->book = $other_book;
-    $this->checkBookNode($other_book, array($node), FALSE, FALSE, $node, array());
-    $this->checkBookNode($node, NULL, $other_book, $other_book, FALSE, array($other_book));
-
-    // Test that we can save a book programatically.
-    $this->drupalLogin($this->bookAuthor);
-    $book = $this->createBookNode('new');
-    $book->save();
-  }
-
-  /**
-   * Checks the outline of sub-pages; previous, up, and next.
-   *
-   * Also checks the printer friendly version of the outline.
-   *
-   * @param \Drupal\Core\Entity\EntityInterface $node
-   *   Node to check.
-   * @param $nodes
-   *   Nodes that should be in outline.
-   * @param $previous
-   *   (optional) Previous link node. Defaults to FALSE.
-   * @param $up
-   *   (optional) Up link node. Defaults to FALSE.
-   * @param $next
-   *   (optional) Next link node. Defaults to FALSE.
-   * @param array $breadcrumb
-   *   The nodes that should be displayed in the breadcrumb.
-   */
-  function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = FALSE, $next = FALSE, array $breadcrumb) {
-    // $number does not use drupal_static as it should not be reset
-    // since it uniquely identifies each call to checkBookNode().
-    static $number = 0;
-    $this->drupalGet('node/' . $node->id());
-
-    // Check outline structure.
-    if ($nodes !== NULL) {
-      $this->assertPattern($this->generateOutlinePattern($nodes), format_string('Node @number outline confirmed.', array('@number' => $number)));
-    }
-    else {
-      $this->pass(format_string('Node %number does not have outline.', array('%number' => $number)));
-    }
-
-    // Check previous, up, and next links.
-    if ($previous) {
-      /** @var \Drupal\Core\Url $url */
-      $url = $previous->urlInfo();
-      $url->setOptions(array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page'))));
-      $this->assertRaw(\Drupal::l('<b>‹</b> ' . $previous->label(), $url), 'Previous page link found.');
-    }
-
-    if ($up) {
-      /** @var \Drupal\Core\Url $url */
-      $url = $up->urlInfo();
-      $url->setOptions(array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page'))));
-      $this->assertRaw(\Drupal::l('Up', $url), 'Up page link found.');
-    }
-
-    if ($next) {
-      /** @var \Drupal\Core\Url $url */
-      $url = $next->urlInfo();
-      $url->setOptions(array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page'))));
-      $this->assertRaw(\Drupal::l($next->label() . ' <b>›</b>', $url), 'Next page link found.');
-    }
-
-    // Compute the expected breadcrumb.
-    $expected_breadcrumb = array();
-    $expected_breadcrumb[] = \Drupal::url('<front>');
-    foreach ($breadcrumb as $a_node) {
-      $expected_breadcrumb[] = $a_node->url();
-    }
-
-    // Fetch links in the current breadcrumb.
-    $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a');
-    $got_breadcrumb = array();
-    foreach ($links as $link) {
-      $got_breadcrumb[] = (string) $link['href'];
-    }
-
-    // Compare expected and got breadcrumbs.
-    $this->assertIdentical($expected_breadcrumb, $got_breadcrumb, 'The breadcrumb is correctly displayed on the page.');
-
-    // Check printer friendly version.
-    $this->drupalGet('book/export/html/' . $node->id());
-    $this->assertText($node->label(), 'Printer friendly title found.');
-    $this->assertRaw($node->body->processed, 'Printer friendly body found.');
-
-    $number++;
-  }
-
-  /**
-   * Creates a regular expression to check for the sub-nodes in the outline.
-   *
-   * @param array $nodes
-   *   An array of nodes to check in outline.
-   *
-   * @return string
-   *   A regular expression that locates sub-nodes of the outline.
-   */
-  function generateOutlinePattern($nodes) {
-    $outline = '';
-    foreach ($nodes as $node) {
-      $outline .= '(node\/' . $node->id() . ')(.*?)(' . $node->label() . ')(.*?)';
-    }
-
-    return '/<nav id="book-navigation-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s';
-  }
-
-  /**
-   * Creates a book node.
-   *
-   * @param int|string $book_nid
-   *   A book node ID or set to 'new' to create a new book.
-   * @param int|null $parent
-   *   (optional) Parent book reference ID. Defaults to NULL.
-   */
-  function createBookNode($book_nid, $parent = NULL) {
-    // $number does not use drupal_static as it should not be reset
-    // since it uniquely identifies each call to createBookNode().
-    static $number = 0; // Used to ensure that when sorted nodes stay in same order.
-
-    $edit = array();
-    $edit['title[0][value]'] = $number . ' - SimpleTest test node ' . $this->randomMachineName(10);
-    $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32);
-    $edit['book[bid]'] = $book_nid;
-
-    if ($parent !== NULL) {
-      $this->drupalPostForm('node/add/book', $edit, t('Change book (update list of parents)'));
-
-      $edit['book[pid]'] = $parent;
-      $this->drupalPostForm(NULL, $edit, t('Save'));
-      // Make sure the parent was flagged as having children.
-      $parent_node = \Drupal::entityManager()->getStorage('node')->loadUnchanged($parent);
-      $this->assertFalse(empty($parent_node->book['has_children']), 'Parent node is marked as having children');
-    }
-    else {
-      $this->drupalPostForm('node/add/book', $edit, t('Save'));
-    }
-
-    // Check to make sure the book node was created.
-    $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-    $this->assertNotNull(($node === FALSE ? NULL : $node), 'Book node found in database.');
-    $number++;
-
-    return $node;
-  }
-
-  /**
-   * Tests book export ("printer-friendly version") functionality.
-   */
-  function testBookExport() {
-    // Create a book.
-    $nodes = $this->createBook();
-
-    // Login as web user and view printer-friendly version.
-    $this->drupalLogin($this->webUser);
-    $this->drupalGet('node/' . $this->book->id());
-    $this->clickLink(t('Printer-friendly version'));
-
-    // Make sure each part of the book is there.
-    foreach ($nodes as $node) {
-      $this->assertText($node->label(), 'Node title found in printer friendly version.');
-      $this->assertRaw($node->body->processed, 'Node body found in printer friendly version.');
-    }
-
-    // Make sure we can't export an unsupported format.
-    $this->drupalGet('book/export/foobar/' . $this->book->id());
-    $this->assertResponse('404', 'Unsupported export format returned "not found".');
-
-    // Make sure we get a 404 on a not existing book node.
-    $this->drupalGet('book/export/html/123');
-    $this->assertResponse('404', 'Not existing book node returned "not found".');
-
-    // Make sure an anonymous user cannot view printer-friendly version.
-    $this->drupalLogout();
-
-    // Load the book and verify there is no printer-friendly version link.
-    $this->drupalGet('node/' . $this->book->id());
-    $this->assertNoLink(t('Printer-friendly version'), 'Anonymous user is not shown link to printer-friendly version.');
-
-    // Try getting the URL directly, and verify it fails.
-    $this->drupalGet('book/export/html/' . $this->book->id());
-    $this->assertResponse('403', 'Anonymous user properly forbidden.');
-
-    // Now grant anonymous users permission to view the printer-friendly
-    // version and verify that node access restrictions still prevent them from
-    // seeing it.
-    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access printer-friendly version'));
-    $this->drupalGet('book/export/html/' . $this->book->id());
-    $this->assertResponse('403', 'Anonymous user properly forbidden from seeing the printer-friendly version when denied by node access.');
-  }
-
-  /**
-   * Tests the functionality of the book navigation block.
-   */
-  function testBookNavigationBlock() {
-    $this->drupalLogin($this->adminUser);
-
-    // Enable the block.
-    $block = $this->drupalPlaceBlock('book_navigation');
-
-    // Give anonymous users the permission 'node test view'.
-    $edit = array();
-    $edit[DRUPAL_ANONYMOUS_RID . '[node test view]'] = TRUE;
-    $this->drupalPostForm('admin/people/permissions/' . DRUPAL_ANONYMOUS_RID, $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users.");
-
-    // Test correct display of the block.
-    $nodes = $this->createBook();
-    $this->drupalGet('<front>');
-    $this->assertText($block->label(), 'Book navigation block is displayed.');
-    $this->assertText($this->book->label(), format_string('Link to book root (@title) is displayed.', array('@title' => $nodes[0]->label())));
-    $this->assertNoText($nodes[0]->label(), 'No links to individual book pages are displayed.');
-  }
-
-  /**
-   * Tests the book navigation block when an access module is installed.
-   */
-  function testNavigationBlockOnAccessModuleInstalled() {
-    $this->drupalLogin($this->adminUser);
-    $block = $this->drupalPlaceBlock('book_navigation', array('block_mode' => 'book pages'));
-
-    // Give anonymous users the permission 'node test view'.
-    $edit = array();
-    $edit[DRUPAL_ANONYMOUS_RID . '[node test view]'] = TRUE;
-    $this->drupalPostForm('admin/people/permissions/' . DRUPAL_ANONYMOUS_RID, $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users.");
-
-    // Create a book.
-    $this->createBook();
-
-    // Test correct display of the block to registered users.
-    $this->drupalLogin($this->webUser);
-    $this->drupalGet('node/' . $this->book->id());
-    $this->assertText($block->label(), 'Book navigation block is displayed to registered users.');
-    $this->drupalLogout();
-
-    // Test correct display of the block to anonymous users.
-    $this->drupalGet('node/' . $this->book->id());
-    $this->assertText($block->label(), 'Book navigation block is displayed to anonymous users.');
-
-    // Test the 'book pages' block_mode setting.
-    $this->drupalGet('<front>');
-    $this->assertNoText($block->label(), 'Book navigation block is not shown on non-book pages.');
-  }
-
-  /**
-   * Tests the access for deleting top-level book nodes.
-   */
-   function testBookDelete() {
-     $node_storage = $this->container->get('entity.manager')->getStorage('node');
-     $nodes = $this->createBook();
-     $this->drupalLogin($this->adminUser);
-     $edit = array();
-
-     // Test access to delete top-level and child book nodes.
-     $this->drupalGet('node/' . $this->book->id() . '/outline/remove');
-     $this->assertResponse('403', 'Deleting top-level book node properly forbidden.');
-     $this->drupalPostForm('node/' . $nodes[4]->id() . '/outline/remove', $edit, t('Remove'));
-     $node_storage->resetCache(array($nodes[4]->id()));
-     $node4 = $node_storage->load($nodes[4]->id());
-     $this->assertTrue(empty($node4->book), 'Deleting child book node properly allowed.');
-
-     // Delete all child book nodes and retest top-level node deletion.
-     foreach ($nodes as $node) {
-       $nids[] = $node->id();
-     }
-     entity_delete_multiple('node', $nids);
-     $this->drupalPostForm('node/' . $this->book->id() . '/outline/remove', $edit, t('Remove'));
-     $node_storage->resetCache(array($this->book->id()));
-     $node = $node_storage->load($this->book->id());
-     $this->assertTrue(empty($node->book), 'Deleting childless top-level book node properly allowed.');
-   }
-
-  /*
-   * Tests node type changing machine name when type is a book allowed type.
-   */
-  function testBookNodeTypeChange() {
-    $this->drupalLogin($this->adminUser);
-    // Change the name, machine name and description.
-    $edit = array(
-      'name' => 'Bar',
-      'type' => 'bar',
-    );
-    $this->drupalPostForm('admin/structure/types/manage/book', $edit, t('Save content type'));
-
-    // Ensure that the config book.settings:allowed_types has been updated with
-    // the new machine and the old one has been removed.
-    $this->assertTrue(book_type_is_allowed('bar'), 'Config book.settings:allowed_types contains the updated node type machine name "bar".');
-    $this->assertFalse(book_type_is_allowed('book'), 'Config book.settings:allowed_types does not contain the old node type machine name "book".');
-
-    $edit = array(
-      'name' => 'Basic page',
-      'title_label' => 'Title for basic page',
-      'type' => 'page',
-    );
-    $this->drupalPostForm('admin/structure/types/add', $edit, t('Save content type'));
-
-    // Add page to the allowed node types.
-    $edit = array(
-      'book_allowed_types[page]' => 'page',
-      'book_allowed_types[bar]' => 'bar',
-    );
-
-    $this->drupalPostForm('admin/structure/book/settings', $edit, t('Save configuration'));
-    $this->assertTrue(book_type_is_allowed('bar'), 'Config book.settings:allowed_types contains the bar node type.');
-    $this->assertTrue(book_type_is_allowed('page'), 'Config book.settings:allowed_types contains the page node type.');
-
-    // Test the order of the book.settings::allowed_types configuration is as
-    // expected. The point of this test is to prove that after changing a node
-    // type going to admin/structure/book/settings and pressing save without
-    // changing anything should not alter the book.settings configuration. The
-    // order will be:
-    // @code
-    // array(
-    //   'bar',
-    //   'page',
-    // );
-    // @endcode
-    $current_config = $this->config('book.settings')->get();
-    $this->drupalPostForm('admin/structure/book/settings', array(), t('Save configuration'));
-    $this->assertIdentical($current_config, $this->config('book.settings')->get());
-
-    // Change the name, machine name and description.
-    $edit = array(
-      'name' => 'Zebra book',
-      'type' => 'zebra',
-    );
-    $this->drupalPostForm('admin/structure/types/manage/bar', $edit, t('Save content type'));
-    $this->assertTrue(book_type_is_allowed('zebra'), 'Config book.settings:allowed_types contains the zebra node type.');
-    $this->assertTrue(book_type_is_allowed('page'), 'Config book.settings:allowed_types contains the page node type.');
-
-    // Test the order of the book.settings::allowed_types configuration is as
-    // expected. The order should be:
-    // @code
-    // array(
-    //   'page',
-    //   'zebra',
-    // );
-    // @endcode
-    $current_config = $this->config('book.settings')->get();
-    $this->drupalPostForm('admin/structure/book/settings', array(), t('Save configuration'));
-    $this->assertIdentical($current_config, $this->config('book.settings')->get());
-
-    $edit = array(
-      'name' => 'Animal book',
-      'type' => 'zebra',
-    );
-    $this->drupalPostForm('admin/structure/types/manage/zebra', $edit, t('Save content type'));
-
-    // Test the order of the book.settings::allowed_types configuration is as
-    // expected. The order should be:
-    // @code
-    // array(
-    //   'page',
-    //   'zebra',
-    // );
-    // @endcode
-    $current_config = $this->config('book.settings')->get();
-    $this->drupalPostForm('admin/structure/book/settings', array(), t('Save configuration'));
-    $this->assertIdentical($current_config, $this->config('book.settings')->get());
-
-    // Ensure that after all the node type changes book.settings:child_type has
-    // the expected value.
-    $this->assertEqual($this->config('book.settings')->get('child_type'), 'zebra');
-  }
-
-  /**
-   * Tests re-ordering of books.
-   */
-  public function testBookOrdering() {
-    // Create new book.
-    $this->createBook();
-    $book = $this->book;
-
-    $this->drupalLogin($this->adminUser);
-    $node1 = $this->createBookNode($book->id());
-    $node2 = $this->createBookNode($book->id());
-    $pid = $node1->book['nid'];
-
-    // Head to admin screen and attempt to re-order.
-    $this->drupalGet('admin/structure/book/' . $book->id());
-    $edit = array(
-      "table[book-admin-{$node1->id()}][weight]" => 1,
-      "table[book-admin-{$node2->id()}][weight]" => 2,
-      // Put node 2 under node 1.
-      "table[book-admin-{$node2->id()}][pid]" => $pid,
-    );
-    $this->drupalPostForm(NULL, $edit, t('Save book pages'));
-    // Verify weight was updated.
-    $this->assertFieldByName("table[book-admin-{$node1->id()}][weight]", 1);
-    $this->assertFieldByName("table[book-admin-{$node2->id()}][weight]", 2);
-    $this->assertFieldByName("table[book-admin-{$node2->id()}][pid]", $pid);
-  }
-
-  /**
-   * Tests outline of a book.
-   */
-  public function testBookOutline() {
-    $this->drupalLogin($this->bookAuthor);
-
-    // Create new node not yet a book.
-    $empty_book = $this->drupalCreateNode(array('type' => 'book'));
-    $this->drupalGet('node/' . $empty_book->id() . '/outline');
-    $this->assertNoLink(t('Book outline'), 'Book Author is not allowed to outline');
-
-    $this->drupalLogin($this->adminUser);
-    $this->drupalGet('node/' . $empty_book->id() . '/outline');
-    $this->assertRaw(t('Book outline'));
-    $this->assertOptionSelected('edit-book-bid', 0, 'Node does not belong to a book');
-
-    $edit = array();
-    $edit['book[bid]'] = '1';
-    $this->drupalPostForm('node/' . $empty_book->id() . '/outline', $edit, t('Add to book outline'));
-    $node = \Drupal::entityManager()->getStorage('node')->load($empty_book->id());
-    // Test the book array.
-    $this->assertEqual($node->book['nid'], $empty_book->id());
-    $this->assertEqual($node->book['bid'], $empty_book->id());
-    $this->assertEqual($node->book['depth'], 1);
-    $this->assertEqual($node->book['p1'], $empty_book->id());
-    $this->assertEqual($node->book['pid'], '0');
-
-    // Create new book.
-    $this->drupalLogin($this->bookAuthor);
-    $book = $this->createBookNode('new');
-
-    $this->drupalLogin($this->adminUser);
-    $this->drupalGet('node/' . $book->id() . '/outline');
-    $this->assertRaw(t('Book outline'));
-
-    // Create a new node and set the book after the node was created.
-    $node = $this->drupalCreateNode(array('type' => 'book'));
-    $edit = array();
-    $edit['book[bid]'] = $node->id();
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
-    $node = \Drupal::entityManager()->getStorage('node')->load($node->id());
-
-    // Test the book array.
-    $this->assertEqual($node->book['nid'], $node->id());
-    $this->assertEqual($node->book['bid'], $node->id());
-    $this->assertEqual($node->book['depth'], 1);
-    $this->assertEqual($node->book['p1'], $node->id());
-    $this->assertEqual($node->book['pid'], '0');
-
-    // Test the form itself.
-    $this->drupalGet('node/' . $node->id() . '/edit');
-    $this->assertOptionSelected('edit-book-bid', $node->id());
-  }
-
-  /**
-   * Tests that saveBookLink() returns something.
-   */
-  public function testSaveBookLink() {
-    $book_manager = \Drupal::service('book.manager');
-
-    // Mock a link for a new book.
-    $link = array('nid' => 1, 'has_children' => 0, 'original_bid' => 0, 'parent_depth_limit' => 8, 'pid' => 0, 'weight' => 0, 'bid' => 1);
-    $new = TRUE;
-
-    // Save the link.
-    $return = $book_manager->saveBookLink($link, $new);
-
-    // Add the link defaults to $link so we have something to compare to the return from saveBookLink().
-    $link += $book_manager->getLinkDefaults($link['nid']);
-
-    // Test the return from saveBookLink.
-    $this->assertEqual($return, $link);
-  }
-
-  /**
-   * Tests the listing of all books.
-   */
-  public function testBookListing() {
-    // Create a new book.
-    $this->createBook();
-
-    // Must be a user with 'node test view' permission since node_access_test is installed.
-    $this->drupalLogin($this->webUser);
-
-    // Load the book page and assert the created book title is displayed.
-    $this->drupalGet('book');
-
-    $this->assertText($this->book->label(), 'The book title is displayed on the book listing page.');
-  }
-
-  /**
-   * Tests the administrative listing of all books.
-   */
-  public function testAdminBookListing() {
-    // Create a new book.
-    $this->createBook();
-
-    // Load the book page and assert the created book title is displayed.
-    $this->drupalLogin($this->adminUser);
-    $this->drupalGet('admin/structure/book');
-    $this->assertText($this->book->label(), 'The book title is displayed on the administrative book listing page.');
-  }
-
-  /**
-   * Tests the administrative listing of all book pages in a book.
-   */
-  public function testAdminBookNodeListing() {
-    // Create a new book.
-    $this->createBook();
-    $this->drupalLogin($this->adminUser);
-
-    // Load the book page list and assert the created book title is displayed
-    // and action links are shown on list items.
-    $this->drupalGet('admin/structure/book/' . $this->book->id());
-    $this->assertText($this->book->label(), 'The book title is displayed on the administrative book listing page.');
-
-    $elements = $this->xpath('//table//ul[@class="dropbutton"]/li/a');
-    $this->assertEqual((string) $elements[0], 'View', 'View link is found from the list.');
-  }
-
-  /**
-   * Ensure the loaded book in hook_node_load() does not depend on the user.
-   */
-  public function testHookNodeLoadAccess() {
-    \Drupal::service('module_installer')->install(['node_access_test']);
-
-    // Ensure that the loaded book in hook_node_load() does NOT depend on the
-    // current user.
-    $this->drupalLogin($this->bookAuthor);
-    $this->book = $this->createBookNode('new');
-    // Reset any internal static caching.
-    $node_storage = \Drupal::entityManager()->getStorage('node');
-    $node_storage->resetCache();
-
-    // Login as user without access to the book node, so no 'node test view'
-    // permission.
-    // @see node_access_test_node_grants().
-    $this->drupalLogin($this->webUserWithoutNodeAccess);
-    $book_node = $node_storage->load($this->book->id());
-    $this->assertTrue(!empty($book_node->book));
-    $this->assertEqual($book_node->book['bid'], $this->book->id());
-
-    // Reset the internal cache to retrigger the hook_node_load() call.
-    $node_storage->resetCache();
-
-    $this->drupalLogin($this->webUser);
-    $book_node = $node_storage->load($this->book->id());
-    $this->assertTrue(!empty($book_node->book));
-    $this->assertEqual($book_node->book['bid'], $this->book->id());
-  }
-
-}
diff --git a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
index 6714a8e..e69de29 100644
--- a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
+++ b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php
@@ -1,133 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\comment\Tests\CommentNewIndicatorTest.
- */
-
-namespace Drupal\comment\Tests;
-
-use Drupal\Component\Serialization\Json;
-use Drupal\Core\Language\LanguageInterface;
-use Drupal\comment\CommentInterface;
-
-/**
- * Tests the 'new' indicator posted on comments.
- *
- * @group comment
- */
-class CommentNewIndicatorTest extends CommentTestBase {
-
-  /**
-   * Use the main node listing to test rendering on teasers.
-   *
-   * @var array
-   *
-   * @todo Remove this dependency.
-   */
-  public static $modules = array('views');
-
-  /**
-   * Get node "x new comments" metadata from the server for the current user.
-   *
-   * @param array $node_ids
-   *   An array of node IDs.
-   *
-   * @return string
-   *   The response body.
-   */
-  protected function renderNewCommentsNodeLinks(array $node_ids) {
-    // Build POST values.
-    $post = array();
-    for ($i = 0; $i < count($node_ids); $i++) {
-      $post['node_ids[' . $i . ']'] = $node_ids[$i];
-    }
-    $post['field_name'] = 'comment';
-
-    // Serialize POST values.
-    foreach ($post as $key => $value) {
-      // Encode according to application/x-www-form-urlencoded
-      // Both names and values needs to be urlencoded, according to
-      // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
-      $post[$key] = urlencode($key) . '=' . urlencode($value);
-    }
-    $post = implode('&', $post);
-
-    // Perform HTTP request.
-    return $this->curlExec(array(
-      CURLOPT_URL => \Drupal::url('comment.new_comments_node_links', array(), array('absolute' => TRUE)),
-      CURLOPT_POST => TRUE,
-      CURLOPT_POSTFIELDS => $post,
-      CURLOPT_HTTPHEADER => array(
-        'Accept: application/json',
-        'Content-Type: application/x-www-form-urlencoded',
-      ),
-    ));
-  }
-
-  /**
-   * Tests new comment marker.
-   */
-  public function testCommentNewCommentsIndicator() {
-    // Test if the right links are displayed when no comment is present for the
-    // node.
-    $this->drupalLogin($this->adminUser);
-    $this->drupalGet('node');
-    $this->assertNoLink(t('@count comments', array('@count' => 0)));
-    $this->assertLink(t('Read more'));
-    // Verify the data-history-node-last-comment-timestamp attribute, which is
-    // used by the drupal.node-new-comments-link library to determine whether
-    // a "x new comments" link might be necessary or not. We do this in
-    // JavaScript to prevent breaking the render cache.
-    $this->assertIdentical(0, count($this->xpath('//*[@data-history-node-last-comment-timestamp]')), 'data-history-node-last-comment-timestamp attribute is not set.');
-
-    // Create a new comment. This helper function may be run with different
-    // comment settings so use $comment->save() to avoid complex setup.
-    /** @var \Drupal\comment\CommentInterface $comment */
-    $comment = entity_create('comment', array(
-      'cid' => NULL,
-      'entity_id' => $this->node->id(),
-      'entity_type' => 'node',
-      'field_name' => 'comment',
-      'pid' => 0,
-      'uid' => $this->loggedInUser->id(),
-      'status' => CommentInterface::PUBLISHED,
-      'subject' => $this->randomMachineName(),
-      'hostname' => '127.0.0.1',
-      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-      'comment_body' => array(LanguageInterface::LANGCODE_NOT_SPECIFIED => array($this->randomMachineName())),
-    ));
-    $comment->save();
-    $this->drupalLogout();
-
-    // Log in with 'web user' and check comment links.
-    $this->drupalLogin($this->webUser);
-    $this->drupalGet('node');
-    // Verify the data-history-node-last-comment-timestamp attribute. Given its
-    // value, the drupal.node-new-comments-link library would determine that the
-    // node received a comment after the user last viewed it, and hence it would
-    // perform an HTTP request to render the "new comments" node link.
-    $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-last-comment-timestamp="' . $comment->getChangedTime() .  '"]')), 'data-history-node-last-comment-timestamp attribute is set to the correct value.');
-    $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-field-name="comment"]')), 'data-history-node-field-name attribute is set to the correct value.');
-    $response = $this->renderNewCommentsNodeLinks(array($this->node->id()));
-    $this->assertResponse(200);
-    $json = Json::decode($response);
-    $expected = array($this->node->id() => array(
-      'new_comment_count' => 1,
-      'first_new_comment_link' => $this->node->url('canonical', array('fragment' => 'new')),
-    ));
-    $this->assertIdentical($expected, $json);
-
-    // Failing to specify node IDs for the endpoint should return a 404.
-    $this->renderNewCommentsNodeLinks(array());
-    $this->assertResponse(404);
-
-    // Accessing the endpoint as the anonymous user should return a 403.
-    $this->drupalLogout();
-    $this->renderNewCommentsNodeLinks(array($this->node->id()));
-    $this->assertResponse(403);
-    $this->renderNewCommentsNodeLinks(array());
-    $this->assertResponse(403);
-  }
-
-}
diff --git a/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php b/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
index 9b0ed7f..e69de29 100644
--- a/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
+++ b/core/modules/comment/src/Tests/Views/ArgumentUserUIDTest.php
@@ -1,41 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\comment\Tests\Views\ArgumentUserUIDTest.
- */
-
-namespace Drupal\comment\Tests\Views;
-
-use Drupal\views\Views;
-
-/**
- * Tests the user posted or commented argument handler.
- *
- * @group comment
- */
-class ArgumentUserUIDTest extends CommentTestBase {
-
-  /**
-   * Views used by this test.
-   *
-   * @var array
-   */
-  public static $testViews = array('test_comment_user_uid');
-
-  function testCommentUserUIDTest() {
-    $view = Views::getView('test_comment_user_uid');
-    $this->executeView($view, array($this->account->id()));
-    $result_set = array(
-      array(
-        'nid' => $this->nodeUserPosted->id(),
-      ),
-      array(
-        'nid' => $this->nodeUserCommented->id(),
-      ),
-    );
-    $column_map = array('nid' => 'nid');
-    $this->assertIdenticalResultset($view, $result_set, $column_map);
-  }
-
-}
diff --git a/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php b/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php
index 4fd7d58..e69de29 100644
--- a/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php
+++ b/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php
@@ -1,123 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\comment\Tests\Views\CommentFieldFilterTest.
- */
-
-namespace Drupal\comment\Tests\Views;
-
-use Drupal\language\Entity\ConfigurableLanguage;
-
-/**
- * Tests comment field filters with translations.
- *
- * @group comment
- */
-class CommentFieldFilterTest extends CommentTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = array('language');
-
-  /**
-   * Views used by this test.
-   *
-   * @var array
-   */
-  public static $testViews = array('test_field_filters');
-
-  /**
-   * List of comment titles by language.
-   *
-   * @var array
-   */
-  public $commentTitles = array();
-
-  function setUp() {
-    parent::setUp();
-    $this->drupalLogin($this->drupalCreateUser(['access comments']));
-
-    // Add two new languages.
-    ConfigurableLanguage::createFromLangcode('fr')->save();
-    ConfigurableLanguage::createFromLangcode('es')->save();
-
-    // Set up comment titles.
-    $this->commentTitles = array(
-      'en' => 'Food in Paris',
-      'es' => 'Comida en Paris',
-      'fr' => 'Nouriture en Paris',
-    );
-
-    // Create a new comment. Using the one created earlier will not work,
-    // as it predates the language set-up.
-    $comment = array(
-      'uid' => $this->loggedInUser->id(),
-      'entity_id' => $this->nodeUserCommented->id(),
-      'entity_type' => 'node',
-      'field_name' => 'comment',
-      'cid' => '',
-      'pid' => '',
-      'node_type' => '',
-    );
-    $this->comment = entity_create('comment', $comment);
-
-    // Add field values and translate the comment.
-    $this->comment->subject->value = $this->commentTitles['en'];
-    $this->comment->comment_body->value = $this->commentTitles['en'];
-    $this->comment->langcode = 'en';
-    $this->comment->save();
-    foreach (array('es', 'fr') as $langcode) {
-      $translation = $this->comment->addTranslation($langcode, array());
-      $translation->comment_body->value = $this->commentTitles[$langcode];
-      $translation->subject->value = $this->commentTitles[$langcode];
-    }
-    $this->comment->save();
-  }
-
-  /**
-   * Tests body and title filters.
-   */
-  public function testFilters() {
-    // Test the title filter page, which filters for title contains 'Comida'.
-    // Should show just the Spanish translation, once.
-    $this->assertPageCounts('test-title-filter', array('es' => 1, 'fr' => 0, 'en' => 0), 'Comida title filter');
-
-    // Test the body filter page, which filters for body contains 'Comida'.
-    // Should show just the Spanish translation, once.
-    $this->assertPageCounts('test-body-filter', array('es' => 1, 'fr' => 0, 'en' => 0), 'Comida body filter');
-
-    // Test the title Paris filter page, which filters for title contains
-    // 'Paris'. Should show each translation once.
-    $this->assertPageCounts('test-title-paris', array('es' => 1, 'fr' => 1, 'en' => 1), 'Paris title filter');
-
-    // Test the body Paris filter page, which filters for body contains
-    // 'Paris'. Should show each translation once.
-    $this->assertPageCounts('test-body-paris', array('es' => 1, 'fr' => 1, 'en' => 1), 'Paris body filter');
-  }
-
-  /**
-   * Asserts that the given comment translation counts are correct.
-   *
-   * @param string $path
-   *   Path of the page to test.
-   * @param array $counts
-   *   Array whose keys are languages, and values are the number of times
-   *   that translation should be shown on the given page.
-   * @param string $message
-   *   Message suffix to display.
-   */
-  protected function assertPageCounts($path, $counts, $message) {
-    // Get the text of the page.
-    $this->drupalGet($path);
-    $text = $this->getTextContent();
-
-    // Check the counts. Note that the title and body are both shown on the
-    // page, and they are the same. So the title/body string should appear on
-    // the page twice as many times as the input count.
-    foreach ($counts as $langcode => $count) {
-      $this->assertEqual(substr_count($text, $this->commentTitles[$langcode]), 2 * $count, 'Translation ' . $langcode . ' has count ' . $count . ' with ' . $message);
-    }
-  }
-}
diff --git a/core/modules/comment/src/Tests/Views/CommentRestExportTest.php b/core/modules/comment/src/Tests/Views/CommentRestExportTest.php
index 8cc432d..e69de29 100644
--- a/core/modules/comment/src/Tests/Views/CommentRestExportTest.php
+++ b/core/modules/comment/src/Tests/Views/CommentRestExportTest.php
@@ -1,68 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\comment\Tests\Views\CommentRestExportTest.
- */
-
-namespace Drupal\comment\Tests\Views;
-
-use Drupal\Component\Serialization\Json;
-
-/**
- * Tests a comment rest export view.
- *
- * @group comment
- */
-class CommentRestExportTest extends CommentTestBase {
-
-  /**
-   * Views used by this test.
-   *
-   * @var array
-   */
-  public static $testViews = ['test_comment_rest'];
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['node', 'comment', 'comment_test_views', 'rest', 'hal'];
-
-  protected function setUp() {
-    parent::setUp();
-    // Add another anonymous comment.
-    $comment = array(
-      'uid' => 0,
-      'entity_id' => $this->nodeUserCommented->id(),
-      'entity_type' => 'node',
-      'field_name' => 'comment',
-      'subject' => 'A lot, apparently',
-      'cid' => '',
-      'pid' => $this->comment->id(),
-      'mail' => 'someone@example.com',
-      'name' => 'bobby tables',
-      'hostname' => 'public.example.com',
-    );
-    $this->comment = entity_create('comment', $comment);
-    $this->comment->save();
-  }
-
-
-  /**
-   * Test comment row.
-   */
-  public function testCommentRestExport() {
-    $this->drupalGet(sprintf('node/%d/comments', $this->nodeUserCommented->id()), [], ['Accept' => 'application/hal+json']);
-    $this->assertResponse(200);
-    $contents = Json::decode($this->getRawContent());
-    $this->assertEqual($contents[0]['subject'], 'How much wood would a woodchuck chuck');
-    $this->assertEqual($contents[1]['subject'], 'A lot, apparently');
-    $this->assertEqual(count($contents), 2);
-
-    // Ensure field-level access is respected - user shouldn't be able to see
-    // mail or hostname fields.
-    $this->assertNoText('someone@example.com');
-    $this->assertNoText('public.example.com');
-  }
-
-}
diff --git a/core/modules/comment/src/Tests/Views/CommentRowTest.php b/core/modules/comment/src/Tests/Views/CommentRowTest.php
index 8fa08c4..e69de29 100644
--- a/core/modules/comment/src/Tests/Views/CommentRowTest.php
+++ b/core/modules/comment/src/Tests/Views/CommentRowTest.php
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\comment\Tests\Views\CommentRowTest.
- */
-
-namespace Drupal\comment\Tests\Views;
-
-/**
- * Tests the comment row plugin.
- *
- * @group comment
- */
-class CommentRowTest extends CommentTestBase {
-
-  /**
-   * Views used by this test.
-   *
-   * @var array
-   */
-  public static $testViews = array('test_comment_row');
-
-  /**
-   * Test comment row.
-   */
-  public function testCommentRow() {
-    $this->drupalGet('test-comment-row');
-
-    $result = $this->xpath('//article[contains(@class, "comment")]');
-    $this->assertEqual(1, count($result), 'One rendered comment found.');
-  }
-
-}
diff --git a/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php b/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
index b2fe796..e69de29 100644
--- a/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
+++ b/core/modules/comment/src/Tests/Views/FilterUserUIDTest.php
@@ -1,53 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\comment\Tests\Views\FilterUserUIDTest.
- */
-
-namespace Drupal\comment\Tests\Views;
-
-use Drupal\views\Views;
-
-/**
- * Tests the user posted or commented filter handler.
- *
- * The actual stuff is done in the parent class.
- *
- * @group comment
- */
-class FilterUserUIDTest extends CommentTestBase {
-
-  /**
-   * Views used by this test.
-   *
-   * @var array
-   */
-  public static $testViews = array('test_comment_user_uid');
-
-  function testCommentUserUIDTest() {
-    $view = Views::getView('test_comment_user_uid');
-    $view->setDisplay();
-    $view->removeHandler('default', 'argument', 'uid_touch');
-
-    $options = array(
-      'id' => 'uid_touch',
-      'table' => 'node_field_data',
-      'field' => 'uid_touch',
-      'value' => array($this->loggedInUser->id()),
-    );
-    $view->addHandler('default', 'filter', 'node_field_data', 'uid_touch', $options);
-    $this->executeView($view, array($this->account->id()));
-    $result_set = array(
-      array(
-        'nid' => $this->nodeUserPosted->id(),
-      ),
-      array(
-        'nid' => $this->nodeUserCommented->id(),
-      ),
-    );
-    $column_map = array('nid' => 'nid');
-    $this->assertIdenticalResultset($view, $result_set, $column_map);
-  }
-
-}
diff --git a/core/modules/dblog/src/Tests/DbLogTest.php b/core/modules/dblog/src/Tests/DbLogTest.php
index d6a59ad..e69de29 100644
--- a/core/modules/dblog/src/Tests/DbLogTest.php
+++ b/core/modules/dblog/src/Tests/DbLogTest.php
@@ -1,663 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\dblog\Tests\DbLogTest.
- */
-
-namespace Drupal\dblog\Tests;
-
-use Drupal\Component\Utility\Unicode;
-use Drupal\Component\Utility\Xss;
-use Drupal\Core\Logger\RfcLogLevel;
-use Drupal\dblog\Controller\DbLogController;
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Generate events and verify dblog entries; verify user access to log reports
- * based on persmissions.
- *
- * @group dblog
- */
-class DbLogTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('dblog', 'node', 'forum', 'help', 'block');
-
-  /**
-   * A user with some relevant administrative permissions.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $adminUser;
-
-  /**
-   * A user without any permissions.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $webUser;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->drupalPlaceBlock('system_breadcrumb_block');
-
-    // Create users with specific permissions.
-    $this->adminUser = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'access site reports', 'administer users'));
-    $this->webUser = $this->drupalCreateUser(array());
-  }
-
-  /**
-   * Tests Database Logging module functionality through interfaces.
-   *
-   * First logs in users, then creates database log events, and finally tests
-   * Database Logging module functionality through both the admin and user
-   * interfaces.
-   */
-  function testDbLog() {
-    // Login the admin user.
-    $this->drupalLogin($this->adminUser);
-
-    $row_limit = 100;
-    $this->verifyRowLimit($row_limit);
-    $this->verifyCron($row_limit);
-    $this->verifyEvents();
-    $this->verifyReports();
-    $this->verifyBreadcrumbs();
-    // Verify the overview table sorting.
-    $orders = array('Date', 'Type', 'User');
-    $sorts = array('asc', 'desc');
-    foreach ($orders as $order) {
-      foreach ($sorts as $sort) {
-        $this->verifySort($sort, $order);
-      }
-    }
-
-    // Login the regular user.
-    $this->drupalLogin($this->webUser);
-    $this->verifyReports(403);
-  }
-
-  /**
-   * Verifies setting of the database log row limit.
-   *
-   * @param int $row_limit
-   *   The row limit.
-   */
-  private function verifyRowLimit($row_limit) {
-    // Change the database log row limit.
-    $edit = array();
-    $edit['dblog_row_limit'] = $row_limit;
-    $this->drupalPostForm('admin/config/development/logging', $edit, t('Save configuration'));
-    $this->assertResponse(200);
-
-    // Check row limit variable.
-    $current_limit = $this->config('dblog.settings')->get('row_limit');
-    $this->assertTrue($current_limit == $row_limit, format_string('[Cache] Row limit variable of @count equals row limit of @limit', array('@count' => $current_limit, '@limit' => $row_limit)));
-  }
-
-  /**
-   * Verifies that cron correctly applies the database log row limit.
-   *
-   * @param int $row_limit
-   *   The row limit.
-   */
-  private function verifyCron($row_limit) {
-    // Generate additional log entries.
-    $this->generateLogEntries($row_limit + 10);
-    // Verify that the database log row count exceeds the row limit.
-    $count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField();
-    $this->assertTrue($count > $row_limit, format_string('Dblog row count of @count exceeds row limit of @limit', array('@count' => $count, '@limit' => $row_limit)));
-
-    // Run a cron job.
-    $this->cronRun();
-    // Verify that the database log row count equals the row limit plus one
-    // because cron adds a record after it runs.
-    $count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField();
-    $this->assertTrue($count == $row_limit + 1, format_string('Dblog row count of @count equals row limit of @limit plus one', array('@count' => $count, '@limit' => $row_limit)));
-  }
-
-  /**
-   * Generates a number of random database log events.
-   *
-   * @param int $count
-   *   Number of watchdog entries to generate.
-   * @param string $type
-   *   (optional) The type of watchdog entry. Defaults to 'custom'.
-   * @param int $severity
-   *   (optional) The severity of the watchdog entry. Defaults to
-   *   \Drupal\Core\Logger\RfcLogLevel::NOTICE.
-   */
-  private function generateLogEntries($count, $type = 'custom', $severity = RfcLogLevel::NOTICE) {
-    global $base_root;
-
-    // Prepare the fields to be logged
-    $log = array(
-      'channel'     => $type,
-      'message'     => 'Log entry added to test the dblog row limit.',
-      'variables'   => array(),
-      'severity'    => $severity,
-      'link'        => NULL,
-      'user'        => $this->adminUser,
-      'uid'         => $this->adminUser->id(),
-      'request_uri' => $base_root . request_uri(),
-      'referer'     => \Drupal::request()->server->get('HTTP_REFERER'),
-      'ip'          => '127.0.0.1',
-      'timestamp'   => REQUEST_TIME,
-      );
-    $message = 'Log entry added to test the dblog row limit. Entry #';
-    for ($i = 0; $i < $count; $i++) {
-      $log['message'] = $message . $i;
-      $this->container->get('logger.dblog')->log($severity, $log['message'], $log);
-    }
-  }
-
-  /**
-   * Confirms that database log reports are displayed at the correct paths.
-   *
-   * @param int $response
-   *   (optional) HTTP response code. Defaults to 200.
-   */
-  private function verifyReports($response = 200) {
-    // View the database log help page.
-    $this->drupalGet('admin/help/dblog');
-    $this->assertResponse($response);
-    if ($response == 200) {
-      $this->assertText(t('Database Logging'), 'DBLog help was displayed');
-    }
-
-    // View the database log report page.
-    $this->drupalGet('admin/reports/dblog');
-    $this->assertResponse($response);
-    if ($response == 200) {
-      $this->assertText(t('Recent log messages'), 'DBLog report was displayed');
-    }
-
-    // View the database log page-not-found report page.
-    $this->drupalGet('admin/reports/page-not-found');
-    $this->assertResponse($response);
-    if ($response == 200) {
-      $this->assertText("Top 'page not found' errors", 'DBLog page-not-found report was displayed');
-    }
-
-    // View the database log access-denied report page.
-    $this->drupalGet('admin/reports/access-denied');
-    $this->assertResponse($response);
-    if ($response == 200) {
-      $this->assertText("Top 'access denied' errors", 'DBLog access-denied report was displayed');
-    }
-
-    // View the database log event page.
-    $wid = db_query('SELECT MIN(wid) FROM {watchdog}')->fetchField();
-    $this->drupalGet('admin/reports/dblog/event/' . $wid);
-    $this->assertResponse($response);
-    if ($response == 200) {
-      $this->assertText(t('Details'), 'DBLog event node was displayed');
-    }
-
-  }
-
-  /**
-   * Generates and then verifies breadcrumbs.
-   */
-  private function verifyBreadcrumbs() {
-    // View the database log event page.
-    $wid = db_query('SELECT MIN(wid) FROM {watchdog}')->fetchField();
-    $this->drupalGet('admin/reports/dblog/event/' . $wid);
-    $xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a';
-    $this->assertEqual(current($this->xpath($xpath)), 'Recent log messages', 'DBLogs link displayed at breadcrumb in event page.');
-  }
-
-  /**
-   * Generates and then verifies various types of events.
-   */
-  private function verifyEvents() {
-    // Invoke events.
-    $this->doUser();
-    $this->drupalCreateContentType(array('type' => 'article', 'name' => t('Article')));
-    $this->drupalCreateContentType(array('type' => 'page', 'name' => t('Basic page')));
-    $this->doNode('article');
-    $this->doNode('page');
-    $this->doNode('forum');
-
-    // When a user account is canceled, any content they created remains but the
-    // uid = 0. Records in the watchdog table related to that user have the uid
-    // set to zero.
-  }
-
-  /**
-   * Verifies the sorting functionality of the database logging reports table.
-   *
-   * @param string $sort
-   *   The sort direction.
-   * @param string $order
-   *   The order by which the table should be sorted.
-   */
-  public function verifySort($sort = 'asc', $order = 'Date') {
-    $this->drupalGet('admin/reports/dblog', array('query' => array('sort' => $sort, 'order' => $order)));
-    $this->assertResponse(200);
-    $this->assertText(t('Recent log messages'), 'DBLog report was displayed correctly and sorting went fine.');
-  }
-
-  /**
-   * Generates and then verifies some user events.
-   */
-  private function doUser() {
-    // Set user variables.
-    $name = $this->randomMachineName();
-    $pass = user_password();
-    // Add a user using the form to generate an add user event (which is not
-    // triggered by drupalCreateUser).
-    $edit = array();
-    $edit['name'] = $name;
-    $edit['mail'] = $name . '@example.com';
-    $edit['pass[pass1]'] = $pass;
-    $edit['pass[pass2]'] = $pass;
-    $edit['status'] = 1;
-    $this->drupalPostForm('admin/people/create', $edit, t('Create new account'));
-    $this->assertResponse(200);
-    // Retrieve the user object.
-    $user = user_load_by_name($name);
-    $this->assertTrue($user != NULL, format_string('User @name was loaded', array('@name' => $name)));
-    // pass_raw property is needed by drupalLogin.
-    $user->pass_raw = $pass;
-    // Login user.
-    $this->drupalLogin($user);
-    // Logout user.
-    $this->drupalLogout();
-    // Fetch the row IDs in watchdog that relate to the user.
-    $result = db_query('SELECT wid FROM {watchdog} WHERE uid = :uid', array(':uid' => $user->id()));
-    foreach ($result as $row) {
-      $ids[] = $row->wid;
-    }
-    $count_before = (isset($ids)) ? count($ids) : 0;
-    $this->assertTrue($count_before > 0, format_string('DBLog contains @count records for @name', array('@count' => $count_before, '@name' => $user->getUsername())));
-
-    // Login the admin user.
-    $this->drupalLogin($this->adminUser);
-    // Delete the user created at the start of this test.
-    // We need to POST here to invoke batch_process() in the internal browser.
-    $this->drupalPostForm('user/' . $user->id() . '/cancel', array('user_cancel_method' => 'user_cancel_reassign'), t('Cancel account'));
-
-    // View the database log report.
-    $this->drupalGet('admin/reports/dblog');
-    $this->assertResponse(200);
-
-    // Verify that the expected events were recorded.
-    // Add user.
-    // Default display includes name and email address; if too long, the email
-    // address is replaced by three periods.
-    $this->assertLogMessage(t('New user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>')), 'DBLog event was recorded: [add user]');
-    // Login user.
-    $this->assertLogMessage(t('Session opened for %name.', array('%name' => $name)), 'DBLog event was recorded: [login user]');
-    // Logout user.
-    $this->assertLogMessage(t('Session closed for %name.', array('%name' => $name)), 'DBLog event was recorded: [logout user]');
-    // Delete user.
-    $message = t('Deleted user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>'));
-    $message_text = Unicode::truncate(Xss::filter($message, array()), 56, TRUE, TRUE);
-    // Verify that the full message displays on the details page.
-    $link = FALSE;
-    if ($links = $this->xpath('//a[text()="' . html_entity_decode($message_text) . '"]')) {
-      // Found link with the message text.
-      $links = array_shift($links);
-      foreach ($links->attributes() as $attr => $value) {
-        if ($attr == 'href') {
-          // Extract link to details page.
-          $link = Unicode::substr($value, strpos($value, 'admin/reports/dblog/event/'));
-          $this->drupalGet($link);
-          // Check for full message text on the details page.
-          $this->assertRaw($message, 'DBLog event details was found: [delete user]');
-          break;
-        }
-      }
-    }
-    $this->assertTrue($link, 'DBLog event was recorded: [delete user]');
-    // Visit random URL (to generate page not found event).
-    $not_found_url = $this->randomMachineName(60);
-    $this->drupalGet($not_found_url);
-    $this->assertResponse(404);
-    // View the database log page-not-found report page.
-    $this->drupalGet('admin/reports/page-not-found');
-    $this->assertResponse(200);
-    // Check that full-length URL displayed.
-    $this->assertText($not_found_url, 'DBLog event was recorded: [page not found]');
-  }
-
-  /**
-   * Generates and then verifies some node events.
-   *
-   * @param string $type
-   *   A node type (e.g., 'article', 'page' or 'forum').
-   */
-  private function doNode($type) {
-    // Create user.
-    $perm = array('create ' . $type . ' content', 'edit own ' . $type . ' content', 'delete own ' . $type . ' content');
-    $user = $this->drupalCreateUser($perm);
-    // Login user.
-    $this->drupalLogin($user);
-
-    // Create a node using the form in order to generate an add content event
-    // (which is not triggered by drupalCreateNode).
-    $edit = $this->getContent($type);
-    $title = $edit['title[0][value]'];
-    $this->drupalPostForm('node/add/' . $type, $edit, t('Save'));
-    $this->assertResponse(200);
-    // Retrieve the node object.
-    $node = $this->drupalGetNodeByTitle($title);
-    $this->assertTrue($node != NULL, format_string('Node @title was loaded', array('@title' => $title)));
-    // Edit the node.
-    $edit = $this->getContentUpdate($type);
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
-    $this->assertResponse(200);
-    // Delete the node.
-    $this->drupalPostForm('node/' . $node->id() . '/delete', array(), t('Delete'));
-    $this->assertResponse(200);
-    // View the node (to generate page not found event).
-    $this->drupalGet('node/' . $node->id());
-    $this->assertResponse(404);
-    // View the database log report (to generate access denied event).
-    $this->drupalGet('admin/reports/dblog');
-    $this->assertResponse(403);
-
-    // Login the admin user.
-    $this->drupalLogin($this->adminUser);
-    // View the database log report.
-    $this->drupalGet('admin/reports/dblog');
-    $this->assertResponse(200);
-
-    // Verify that node events were recorded.
-    // Was node content added?
-    $this->assertLogMessage(t('@type: added %title.', array('@type' => $type, '%title' => $title)), 'DBLog event was recorded: [content added]');
-    // Was node content updated?
-    $this->assertLogMessage(t('@type: updated %title.', array('@type' => $type, '%title' => $title)), 'DBLog event was recorded: [content updated]');
-    // Was node content deleted?
-    $this->assertLogMessage(t('@type: deleted %title.', array('@type' => $type, '%title' => $title)), 'DBLog event was recorded: [content deleted]');
-
-    // View the database log access-denied report page.
-    $this->drupalGet('admin/reports/access-denied');
-    $this->assertResponse(200);
-    // Verify that the 'access denied' event was recorded.
-    $this->assertText('admin/reports/dblog', 'DBLog event was recorded: [access denied]');
-
-    // View the database log page-not-found report page.
-    $this->drupalGet('admin/reports/page-not-found');
-    $this->assertResponse(200);
-    // Verify that the 'page not found' event was recorded.
-    $this->assertText('node/' . $node->id(), 'DBLog event was recorded: [page not found]');
-  }
-
-  /**
-   * Creates random content based on node content type.
-   *
-   * @param string $type
-   *   Node content type (e.g., 'article').
-   *
-   * @return array
-   *   Random content needed by various node types.
-   */
-  private function getContent($type) {
-    switch ($type) {
-      case 'forum':
-        $content = array(
-          'title[0][value]' => $this->randomMachineName(8),
-          'taxonomy_forums' => array(1),
-          'body[0][value]' => $this->randomMachineName(32),
-        );
-        break;
-
-      default:
-        $content = array(
-          'title[0][value]' => $this->randomMachineName(8),
-          'body[0][value]' => $this->randomMachineName(32),
-        );
-        break;
-    }
-    return $content;
-  }
-
-  /**
-   * Creates random content as an update based on node content type.
-   *
-   * @param string $type
-   *   Node content type (e.g., 'article').
-   *
-   * @return array
-   *   Random content needed by various node types.
-   */
-  private function getContentUpdate($type) {
-    $content = array(
-      'body[0][value]' => $this->randomMachineName(32),
-    );
-    return $content;
-  }
-
-  /**
-   * Tests the addition and clearing of log events through the admin interface.
-   *
-   * Logs in the admin user, creates a database log event, and tests the
-   * functionality of clearing the database log through the admin interface.
-   */
-  protected function testDBLogAddAndClear() {
-    global $base_root;
-    // Get a count of how many watchdog entries already exist.
-    $count = db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField();
-    $log = array(
-      'channel'     => 'system',
-      'message'     => 'Log entry added to test the doClearTest clear down.',
-      'variables'   => array(),
-      'severity'    => RfcLogLevel::NOTICE,
-      'link'        => NULL,
-      'user'        => $this->adminUser,
-      'uid'         => $this->adminUser->id(),
-      'request_uri' => $base_root . request_uri(),
-      'referer'     => \Drupal::request()->server->get('HTTP_REFERER'),
-      'ip'          => '127.0.0.1',
-      'timestamp'   => REQUEST_TIME,
-    );
-    // Add a watchdog entry.
-    $this->container->get('logger.dblog')->log($log['severity'], $log['message'], $log);
-    // Make sure the table count has actually been incremented.
-    $this->assertEqual($count + 1, db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(), format_string('\Drupal\dblog\Logger\DbLog->log() added an entry to the dblog :count', array(':count' => $count)));
-    // Login the admin user.
-    $this->drupalLogin($this->adminUser);
-    // Post in order to clear the database table.
-    $this->drupalPostForm('admin/reports/dblog', array(), t('Clear log messages'));
-    // Confirm that the logs should be cleared.
-    $this->drupalPostForm(NULL, array(), 'Confirm');
-    // Count the rows in watchdog that previously related to the deleted user.
-    $count = db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField();
-    $this->assertEqual($count, 0, format_string('DBLog contains :count records after a clear.', array(':count' => $count)));
-  }
-
-  /**
-   * Tests the database log filter functionality at admin/reports/dblog.
-   */
-  protected function testFilter() {
-    $this->drupalLogin($this->adminUser);
-
-    // Clear the log to ensure that only generated entries will be found.
-    db_delete('watchdog')->execute();
-
-    // Generate 9 random watchdog entries.
-    $type_names = array();
-    $types = array();
-    for ($i = 0; $i < 3; $i++) {
-      $type_names[] = $type_name = $this->randomMachineName();
-      $severity = RfcLogLevel::EMERGENCY;
-      for ($j = 0; $j < 3; $j++) {
-        $types[] = $type = array(
-          'count' => $j + 1,
-          'type' => $type_name,
-          'severity' => $severity++,
-        );
-        $this->generateLogEntries($type['count'], $type['type'], $type['severity']);
-      }
-    }
-
-    // View the database log page.
-    $this->drupalGet('admin/reports/dblog');
-
-    // Confirm that all the entries are displayed.
-    $count = $this->getTypeCount($types);
-    foreach ($types as $key => $type) {
-      $this->assertEqual($count[$key], $type['count'], 'Count matched');
-    }
-
-    // Filter by each type and confirm that entries with various severities are
-    // displayed.
-    foreach ($type_names as $type_name) {
-      $edit = array(
-        'type[]' => array($type_name),
-      );
-      $this->drupalPostForm(NULL, $edit, t('Filter'));
-
-      // Count the number of entries of this type.
-      $type_count = 0;
-      foreach ($types as $type) {
-        if ($type['type'] == $type_name) {
-          $type_count += $type['count'];
-        }
-      }
-
-      $count = $this->getTypeCount($types);
-      $this->assertEqual(array_sum($count), $type_count, 'Count matched');
-    }
-
-    // Set the filter to match each of the two filter-type attributes and
-    // confirm the correct number of entries are displayed.
-    foreach ($types as $type) {
-      $edit = array(
-        'type[]' => array($type['type']),
-        'severity[]' => array($type['severity']),
-      );
-      $this->drupalPostForm(NULL, $edit, t('Filter'));
-
-      $count = $this->getTypeCount($types);
-      $this->assertEqual(array_sum($count), $type['count'], 'Count matched');
-    }
-
-    $this->drupalGet('admin/reports/dblog', array('query' => array('order' => 'Type')));
-    $this->assertResponse(200);
-    $this->assertText(t('Operations'), 'Operations text found');
-
-    // Clear all logs and make sure the confirmation message is found.
-    $this->drupalPostForm('admin/reports/dblog', array(), t('Clear log messages'));
-    // Confirm that the logs should be cleared.
-    $this->drupalPostForm(NULL, array(), 'Confirm');
-    $this->assertText(t('Database log cleared.'), 'Confirmation message found');
-  }
-
-  /**
-   * Gets the database log event information from the browser page.
-   *
-   * @return array
-   *   List of log events where each event is an array with following keys:
-   *   - severity: (int) A database log severity constant.
-   *   - type: (string) The type of database log event.
-   *   - message: (string) The message for this database log event.
-   *   - user: (string) The user associated with this database log event.
-   */
-  protected function getLogEntries() {
-    $entries = array();
-    if ($table = $this->xpath('.//table[@id="admin-dblog"]')) {
-      $table = array_shift($table);
-      foreach ($table->tbody->tr as $row) {
-        $entries[] = array(
-          'severity' => $this->getSeverityConstant($row['class']),
-          'type' => $this->asText($row->td[1]),
-          'message' => $this->asText($row->td[3]),
-          'user' => $this->asText($row->td[4]),
-        );
-      }
-    }
-    return $entries;
-  }
-
-  /**
-   * Gets the count of database log entries by database log event type.
-   *
-   * @param array $types
-   *   The type information to compare against.
-   *
-   * @return array
-   *   The count of each type keyed by the key of the $types array.
-   */
-  protected function getTypeCount(array $types) {
-    $entries = $this->getLogEntries();
-    $count = array_fill(0, count($types), 0);
-    foreach ($entries as $entry) {
-      foreach ($types as $key => $type) {
-        if ($entry['type'] == $type['type'] && $entry['severity'] == $type['severity']) {
-          $count[$key]++;
-          break;
-        }
-      }
-    }
-    return $count;
-  }
-
-  /**
-   * Gets the watchdog severity constant corresponding to the CSS class.
-   *
-   * @param string $class
-   *   CSS class attribute.
-   *
-   * @return int|null
-   *   The watchdog severity constant or NULL if not found.
-   */
-  protected function getSeverityConstant($class) {
-    $map = array_flip(DbLogController::getLogLevelClassMap());
-
-    // Find the class that contains the severity.
-    $classes = explode(' ', $class);
-    foreach ($classes as $class) {
-      if (isset($map[$class])) {
-        return $map[$class];
-      }
-    }
-    return NULL;
-  }
-
-  /**
-   * Extracts the text contained by the XHTML element.
-   *
-   * @param \SimpleXMLElement $element
-   *   Element to extract text from.
-   *
-   * @return string
-   *   Extracted text.
-   */
-  protected function asText(\SimpleXMLElement $element) {
-    if (!is_object($element)) {
-      return $this->fail('The element is not an element.');
-    }
-    return trim(html_entity_decode(strip_tags($element->asXML())));
-  }
-
-  /**
-   * Confirms that a log message appears on the database log overview screen.
-   *
-   * This function should only be used for the admin/reports/dblog page, because
-   * it checks for the message link text truncated to 56 characters. Other log
-   * pages have no detail links so they contain the full message text.
-   *
-   * @param string $log_message
-   *   The database log message to check.
-   * @param string $message
-   *   The message to pass to simpletest.
-   */
-  protected function assertLogMessage($log_message, $message) {
-    $message_text = Unicode::truncate(Xss::filter($log_message, array()), 56, TRUE, TRUE);
-    // After \Drupal\Component\Utility\Xss::filter(), HTML entities should be
-    // converted to their character equivalents because assertLink() uses this
-    // string in xpath() to query the Document Object Model (DOM).
-    $this->assertLink(html_entity_decode($message_text), 0, $message);
-  }
-}
diff --git a/core/modules/file/src/Tests/FileListingTest.php b/core/modules/file/src/Tests/FileListingTest.php
index 25b170e..e69de29 100644
--- a/core/modules/file/src/Tests/FileListingTest.php
+++ b/core/modules/file/src/Tests/FileListingTest.php
@@ -1,169 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\file\Tests\FileListingTest.
- */
-
-namespace Drupal\file\Tests;
-
-use Drupal\node\Entity\Node;
-
-/**
- * Tests file listing page functionality.
- *
- * @group file
- */
-class FileListingTest extends FileFieldTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('views', 'file', 'image');
-
-  protected function setUp() {
-    parent::setUp();
-
-    $this->admin_user = $this->drupalCreateUser(array('access files overview', 'bypass node access'));
-    $this->base_user = $this->drupalCreateUser();
-    $this->createFileField('file', 'node', 'article', array(), array('file_extensions' => 'txt png'));
-  }
-
-  /**
-   * Calculates total count of usages for a file.
-   *
-   * @param $usage array
-   *   Array of file usage information as returned from file_usage subsystem.
-   * @return int
-   *   Total usage count.
-   */
-  protected function sumUsages($usage) {
-    $count = 0;
-    foreach ($usage as $module) {
-      foreach ($module as $entity_type) {
-        foreach ($entity_type as $entity) {
-          $count += $entity;
-        }
-      }
-    }
-
-    return $count;
-  }
-
-  /**
-   * Tests file overview with different user permissions.
-   */
-  function testFileListingPages() {
-    $file_usage = $this->container->get('file.usage');
-    // Users without sufficient permissions should not see file listing.
-    $this->drupalLogin($this->base_user);
-    $this->drupalGet('admin/content/files');
-    $this->assertResponse(403);
-
-    // Login with user with right permissions and test listing.
-    $this->drupalLogin($this->admin_user);
-
-    for ($i = 0; $i < 5; $i++) {
-      $nodes[] = $this->drupalCreateNode(array('type' => 'article'));
-    }
-
-    $this->drupalGet('admin/content/files');
-    $this->assertResponse(200);
-    $this->assertText('No files available.');
-    $this->drupalGet('admin/content/files');
-    $this->assertResponse(200);
-
-    // Create a file with no usage.
-    $file = $this->createFile();
-
-    $this->drupalGet('admin/content/files/usage/' . $file->id());
-    $this->assertResponse(200);
-    $this->assertTitle(t('File usage information for @file | Drupal', array('@file' => $file->getFilename())));
-
-    foreach ($nodes as &$node) {
-      $this->drupalGet('node/' . $node->id() . '/edit');
-      $file = $this->getTestFile('image');
-
-      $edit = array(
-        'files[file_0]' => drupal_realpath($file->getFileUri()),
-      );
-      $this->drupalPostForm(NULL, $edit, t('Save'));
-      $node = Node::load($node->id());
-    }
-
-    $this->drupalGet('admin/content/files');
-
-    foreach ($nodes as $node) {
-      $file = entity_load('file', $node->file->target_id);
-      $this->assertText($file->getFilename());
-      $this->assertLinkByHref(file_create_url($file->getFileUri()));
-      $this->assertLinkByHref('admin/content/files/usage/' . $file->id());
-    }
-    $this->assertFalse(preg_match('/views-field-status priority-low\">\s*' . t('Temporary') . '/', $this->drupalGetContent()), 'All files are stored as permanent.');
-
-    // Use one file two times and check usage information.
-    $orphaned_file = $nodes[1]->file->target_id;
-    $used_file = $nodes[0]->file->target_id;
-    $nodes[1]->file->target_id = $used_file;
-    $nodes[1]->save();
-
-    $this->drupalGet('admin/content/files');
-    $file = entity_load('file', $orphaned_file);
-    $usage = $this->sumUsages($file_usage->listUsage($file));
-    $this->assertRaw('admin/content/files/usage/' . $file->id() . '">' . $usage);
-
-    $file = entity_load('file', $used_file);
-    $usage = $this->sumUsages($file_usage->listUsage($file));
-    $this->assertRaw('admin/content/files/usage/' . $file->id() . '">' . $usage);
-
-    $result = $this->xpath("//td[contains(@class, 'views-field-status') and contains(text(), :value)]", array(':value' => t('Temporary')));
-    $this->assertEqual(1, count($result), 'Unused file marked as temporary.');
-
-    // Test file usage page.
-    foreach ($nodes as $node) {
-      $file = entity_load('file', $node->file->target_id);
-      $usage = $file_usage->listUsage($file);
-      $this->drupalGet('admin/content/files/usage/' . $file->id());
-      $this->assertResponse(200);
-      $this->assertText($node->getTitle(), 'Node title found on usage page.');
-      $this->assertText('node', 'Registering entity type found on usage page.');
-      $this->assertText('file', 'Registering module found on usage page.');
-      foreach ($usage as $module) {
-        foreach ($module as $entity_type) {
-          foreach ($entity_type as $entity) {
-            $this->assertText($entity, 'Usage count found on usage page.');
-          }
-        }
-      }
-      $this->assertLinkByHref('node/' . $node->id(), 0, 'Link to registering entity found on usage page.');
-    }
-  }
-
-  /**
-   * Creates and saves a test file.
-   *
-   * @return \Drupal\Core\Entity\EntityInterface
-   *  A file entity.
-   */
-  protected function createFile() {
-    // Create a new file entity.
-    $file = entity_create('file', array(
-      'uid' => 1,
-      'filename' => 'druplicon.txt',
-      'uri' => 'public://druplicon.txt',
-      'filemime' => 'text/plain',
-      'created' => 1,
-      'changed' => 1,
-      'status' => FILE_STATUS_PERMANENT,
-    ));
-    file_put_contents($file->getFileUri(), 'hello world');
-
-    // Save it, inserting a new record.
-    $file->save();
-
-    return $file;
-  }
-
-}
diff --git a/core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php b/core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php
index 4841d02..e69de29 100644
--- a/core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php
+++ b/core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php
@@ -1,130 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\file\Tests\PrivateFileOnTranslatedEntityTest.
- */
-
-namespace Drupal\file\Tests;
-
-use Drupal\file\Entity\File;
-use Drupal\node\Entity\Node;
-
-/**
- * Uploads private files to translated node and checks access.
- *
- * @group file
- */
-class PrivateFileOnTranslatedEntityTest extends FileFieldTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = array('language', 'content_translation');
-
-  /**
-   * The name of the file field used in the test.
-   *
-   * @var string
-   */
-  protected $fieldName;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    // Create the "Basic page" node type.
-    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
-
-    // Create a file field on the "Basic page" node type.
-    $this->fieldName = strtolower($this->randomMachineName());
-    $this->createFileField($this->fieldName, 'node', 'page', array('uri_scheme' => 'private'));
-
-    // Create and login user.
-    $permissions = array(
-      'access administration pages',
-      'administer content translation',
-      'administer content types',
-      'administer languages',
-      'create content translations',
-      'create page content',
-      'edit any page content',
-      'translate any entity',
-    );
-    $admin_user = $this->drupalCreateUser($permissions);
-    $this->drupalLogin($admin_user);
-
-    // Add a second language.
-    $edit = array();
-    $edit['predefined_langcode'] = 'fr';
-    $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
-
-    // Enable translation for "Basic page" nodes.
-    $edit = array(
-      'entity_types[node]' => 1,
-      'settings[node][page][translatable]' => 1,
-      "settings[node][page][fields][$this->fieldName]" => 1,
-    );
-    $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
-    \Drupal::entityManager()->clearCachedDefinitions();
-  }
-
-  /**
-   * Tests private file fields on translated nodes.
-   */
-  public function testPrivateLanguageFile() {
-    // Verify that the file field on the "Basic page" node type is translatable.
-    $definitions = \Drupal::entityManager()->getFieldDefinitions('node', 'page');
-    $this->assertTrue($definitions[$this->fieldName]->isTranslatable(), 'Node file field is translatable.');
-
-    // Create a default language node.
-    $default_language_node = $this->drupalCreateNode(array('type' => 'page'));
-
-    // Edit the node to upload a file.
-    $edit = array();
-    $name = 'files[' . $this->fieldName . '_0]';
-    $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[0]->uri);
-    $this->drupalPostForm('node/' . $default_language_node->id() . '/edit', $edit, t('Save'));
-    $last_fid_prior = $this->getLastFileId();
-
-    // Languages are cached on many levels, and we need to clear those caches.
-    $this->rebuildContainer();
-
-    // Ensure the file can be downloaded.
-    \Drupal::entityManager()->getStorage('node')->resetCache(array($default_language_node->id()));
-    $node = Node::load($default_language_node->id());
-    $node_file = File::load($node->{$this->fieldName}->target_id);
-    $this->drupalGet(file_create_url($node_file->getFileUri()));
-    $this->assertResponse(200, 'Confirmed that the file attached to the English node can be downloaded.');
-
-    // Translate the node into French.
-    $this->drupalGet('node/' . $default_language_node->id() . '/translations');
-    $this->clickLink(t('Add'));
-
-    // Remove the existing file.
-    $this->drupalPostForm(NULL, array(), t('Remove'));
-
-    // Upload a different file.
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName();
-    $name = 'files[' . $this->fieldName . '_0]';
-    $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[1]->uri);
-    $this->drupalPostForm(NULL, $edit, t('Save (this translation)'));
-    $last_fid = $this->getLastFileId();
-
-    // Verify the translation was created.
-    \Drupal::entityManager()->getStorage('node')->resetCache(array($default_language_node->id()));
-    $default_language_node = Node::load($default_language_node->id());
-    $this->assertTrue($default_language_node->hasTranslation('fr'), 'Node found in database.');
-    $this->assertTrue($last_fid > $last_fid_prior, 'New file got saved.');
-
-    // Ensure the file attached to the translated node can be downloaded.
-    $french_node = $default_language_node->getTranslation('fr');
-    $node_file = File::load($french_node->{$this->fieldName}->target_id);
-    $this->drupalGet(file_create_url($node_file->getFileUri()));
-    $this->assertResponse(200, 'Confirmed that the file attached to the French node can be downloaded.');
-  }
-
-}
diff --git a/core/modules/filter/src/Tests/FilterAdminTest.php b/core/modules/filter/src/Tests/FilterAdminTest.php
index 760994b..e69de29 100644
--- a/core/modules/filter/src/Tests/FilterAdminTest.php
+++ b/core/modules/filter/src/Tests/FilterAdminTest.php
@@ -1,363 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\filter\Tests\FilterAdminTest.
- */
-
-namespace Drupal\filter\Tests;
-
-use Drupal\Component\Utility\String;
-use Drupal\Component\Utility\Unicode;
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Thoroughly test the administrative interface of the filter module.
- *
- * @group filter
- */
-class FilterAdminTest extends WebTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = array('filter', 'node');
-
-  /**
-   * An user with administration permissions.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $adminUser;
-
-  /**
-   * An user with permissions to create pages.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $webUser;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
-
-    // Set up the filter formats used by this test.
-    $basic_html_format = entity_create('filter_format', array(
-      'format' => 'basic_html',
-      'name' => 'Basic HTML',
-      'filters' => array(
-        'filter_html' => array(
-          'status' => 1,
-          'settings' => array(
-            'allowed_html' => '<p> <br> <strong> <a> <em>',
-          ),
-        ),
-      ),
-    ));
-    $basic_html_format->save();
-    $restricted_html_format = entity_create('filter_format', array(
-      'format' => 'restricted_html',
-      'name' => 'Restricted HTML',
-      'filters' => array(
-        'filter_html' => array(
-          'status' => TRUE,
-          'weight' => -10,
-          'settings' => array(
-            'allowed_html' => '<p> <br> <strong> <a> <em> <h4>',
-          ),
-        ),
-        'filter_autop' => array(
-          'status' => TRUE,
-          'weight' => 0,
-        ),
-        'filter_url' => array(
-          'status' => TRUE,
-          'weight' => 0,
-        ),
-        'filter_htmlcorrector' => array(
-          'status' => TRUE,
-          'weight' => 10,
-        ),
-      ),
-    ));
-    $restricted_html_format->save();
-    $full_html_format = entity_create('filter_format', array(
-      'format' => 'full_html',
-      'name' => 'Full HTML',
-      'weight' => 1,
-      'filters' => array(),
-    ));
-    $full_html_format->save();
-
-    $this->adminUser = $this->drupalCreateUser(array(
-      'administer filters',
-      $basic_html_format->getPermissionName(),
-      $restricted_html_format->getPermissionName(),
-      $full_html_format->getPermissionName(),
-    ));
-
-    $this->webUser = $this->drupalCreateUser(array('create page content', 'edit own page content'));
-    user_role_grant_permissions('authenticated', array($basic_html_format->getPermissionName()));
-    user_role_grant_permissions('anonymous', array($restricted_html_format->getPermissionName()));
-    $this->drupalLogin($this->adminUser);
-  }
-
-  /**
-   * Tests the format administration functionality.
-   */
-  function testFormatAdmin() {
-    // Add text format.
-    $this->drupalGet('admin/config/content/formats');
-    $this->clickLink('Add text format');
-    $format_id = Unicode::strtolower($this->randomMachineName());
-    $name = $this->randomMachineName();
-    $edit = array(
-      'format' => $format_id,
-      'name' => $name,
-    );
-    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
-
-    // Verify default weight of the text format.
-    $this->drupalGet('admin/config/content/formats');
-    $this->assertFieldByName("formats[$format_id][weight]", 0, 'Text format weight was saved.');
-
-    // Change the weight of the text format.
-    $edit = array(
-      "formats[$format_id][weight]" => 5,
-    );
-    $this->drupalPostForm('admin/config/content/formats', $edit, t('Save changes'));
-    $this->assertFieldByName("formats[$format_id][weight]", 5, 'Text format weight was saved.');
-
-    // Edit text format.
-    $this->drupalGet('admin/config/content/formats');
-    // Cannot use the assertNoLinkByHref method as it does partial url matching
-    // and 'admin/config/content/formats/manage/' . $format_id . '/disable'
-    // exists.
-    // @todo: See https://drupal.org/node/2031223 for the above
-    $edit_link = $this->xpath('//a[@href=:href]', array(
-      ':href' => \Drupal::url('entity.filter_format.edit_form', ['filter_format' => $format_id])
-    ));
-    $this->assertTrue($edit_link, format_string('Link href %href found.',
-      array('%href' => 'admin/config/content/formats/manage/' . $format_id)
-    ));
-    $this->drupalGet('admin/config/content/formats/manage/' . $format_id);
-    $this->drupalPostForm(NULL, array(), t('Save configuration'));
-
-    // Verify that the custom weight of the text format has been retained.
-    $this->drupalGet('admin/config/content/formats');
-    $this->assertFieldByName("formats[$format_id][weight]", 5, 'Text format weight was retained.');
-
-    // Disable text format.
-    $this->assertLinkByHref('admin/config/content/formats/manage/' . $format_id . '/disable');
-    $this->drupalGet('admin/config/content/formats/manage/' . $format_id . '/disable');
-    $this->drupalPostForm(NULL, array(), t('Disable'));
-
-    // Verify that disabled text format no longer exists.
-    $this->drupalGet('admin/config/content/formats/manage/' . $format_id);
-    $this->assertResponse(404, 'Disabled text format no longer exists.');
-
-    // Attempt to create a format of the same machine name as the disabled
-    // format but with a different human readable name.
-    $edit = array(
-      'format' => $format_id,
-      'name' => 'New format',
-    );
-    $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration'));
-    $this->assertText('The machine-readable name is already in use. It must be unique.');
-
-    // Attempt to create a format of the same human readable name as the
-    // disabled format but with a different machine name.
-    $edit = array(
-      'format' => 'new_format',
-      'name' => $name,
-    );
-    $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration'));
-    $this->assertRaw(t('Text format names must be unique. A format named %name already exists.', array(
-      '%name' => $name,
-    )));
-  }
-
-  /**
-   * Tests filter administration functionality.
-   */
-  function testFilterAdmin() {
-    $first_filter = 'filter_autop';
-    $second_filter = 'filter_url';
-
-    $basic = 'basic_html';
-    $restricted = 'restricted_html';
-    $full = 'full_html';
-    $plain = 'plain_text';
-
-    // Check that the fallback format exists and cannot be disabled.
-    $this->assertTrue($plain == filter_fallback_format(), 'The fallback format is set to plain text.');
-    $this->drupalGet('admin/config/content/formats');
-    $this->assertNoRaw('admin/config/content/formats/manage/' . $plain . '/disable', 'Disable link for the fallback format not found.');
-    $this->drupalGet('admin/config/content/formats/manage/' . $plain . '/disable');
-    $this->assertResponse(403, 'The fallback format cannot be disabled.');
-
-    // Verify access permissions to Full HTML format.
-    $full_format = entity_load('filter_format', $full);
-    $this->assertTrue($full_format->access('use', $this->adminUser), 'Admin user may use Full HTML.');
-    $this->assertFalse($full_format->access('use', $this->webUser), 'Web user may not use Full HTML.');
-
-    // Add an additional tag.
-    $edit = array();
-    $edit['filters[filter_html][settings][allowed_html]'] = '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <quote>';
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $restricted, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/manage/' . $restricted);
-    $this->assertFieldByName('filters[filter_html][settings][allowed_html]', $edit['filters[filter_html][settings][allowed_html]'], 'Allowed HTML tag added.');
-
-    $elements = $this->xpath('//select[@name=:first]/following::select[@name=:second]', array(
-      ':first' => 'filters[' . $first_filter . '][weight]',
-      ':second' => 'filters[' . $second_filter . '][weight]',
-    ));
-    $this->assertTrue(!empty($elements), 'Order confirmed in admin interface.');
-
-    // Reorder filters.
-    $edit = array();
-    $edit['filters[' . $second_filter . '][weight]'] = 1;
-    $edit['filters[' . $first_filter . '][weight]'] = 2;
-    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/manage/' . $restricted);
-    $this->assertFieldByName('filters[' . $second_filter . '][weight]', 1, 'Order saved successfully.');
-    $this->assertFieldByName('filters[' . $first_filter . '][weight]', 2, 'Order saved successfully.');
-
-    $elements = $this->xpath('//select[@name=:first]/following::select[@name=:second]', array(
-      ':first' => 'filters[' . $second_filter . '][weight]',
-      ':second' => 'filters[' . $first_filter . '][weight]',
-    ));
-    $this->assertTrue(!empty($elements), 'Reorder confirmed in admin interface.');
-
-    $filter_format = entity_load('filter_format', $restricted);
-    foreach ($filter_format->filters() as $filter_name => $filter) {
-      if ($filter_name == $second_filter || $filter_name == $first_filter) {
-        $filters[] = $filter_name;
-      }
-    }
-    // Ensure that the second filter is now before the first filter.
-    $this->assertEqual($filter_format->filters($second_filter)->weight + 1, $filter_format->filters($first_filter)->weight, 'Order confirmed in configuration.');
-
-    // Add format.
-    $edit = array();
-    $edit['format'] = Unicode::strtolower($this->randomMachineName());
-    $edit['name'] = $this->randomMachineName();
-    $edit['roles[' . DRUPAL_AUTHENTICATED_RID . ']'] = 1;
-    $edit['filters[' . $second_filter . '][status]'] = TRUE;
-    $edit['filters[' . $first_filter . '][status]'] = TRUE;
-    $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->assertRaw(t('Added text format %format.', array('%format' => $edit['name'])), 'New filter created.');
-
-    filter_formats_reset();
-    $format = entity_load('filter_format', $edit['format']);
-    $this->assertNotNull($format, 'Format found in database.');
-    $this->drupalGet('admin/config/content/formats/manage/' . $format->id());
-    $this->assertFieldByName('roles[' . DRUPAL_AUTHENTICATED_RID . ']', '', 'Role found.');
-    $this->assertFieldByName('filters[' . $second_filter . '][status]', '', 'Line break filter found.');
-    $this->assertFieldByName('filters[' . $first_filter . '][status]', '', 'Url filter found.');
-
-    // Disable new filter.
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $format->id() . '/disable', array(), t('Disable'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->assertRaw(t('Disabled text format %format.', array('%format' => $edit['name'])), 'Format successfully disabled.');
-
-    // Allow authenticated users on full HTML.
-    $format = entity_load('filter_format', $full);
-    $edit = array();
-    $edit['roles[' . DRUPAL_ANONYMOUS_RID . ']'] = 0;
-    $edit['roles[' . DRUPAL_AUTHENTICATED_RID . ']'] = 1;
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $full, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->assertRaw(t('The text format %format has been updated.', array('%format' => $format->label())), 'Full HTML format successfully updated.');
-
-    // Switch user.
-    $this->drupalLogin($this->webUser);
-
-    $this->drupalGet('node/add/page');
-    $this->assertRaw('<option value="' . $full . '">Full HTML</option>', 'Full HTML filter accessible.');
-
-    // Use basic HTML and see if it removes tags that are not allowed.
-    $body = '<em>' . $this->randomMachineName() . '</em>';
-    $extra_text = 'text';
-    $text = $body . '<random>' . $extra_text . '</random>';
-
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName();
-    $edit['body[0][value]'] = $text;
-    $edit['body[0][format]'] = $basic;
-    $this->drupalPostForm('node/add/page', $edit, t('Save'));
-    $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit['title[0][value]'])), 'Filtered node created.');
-
-    $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-    $this->assertTrue($node, 'Node found in database.');
-
-    $this->drupalGet('node/' . $node->id());
-    $this->assertRaw($body . $extra_text, 'Filter removed invalid tag.');
-
-    // Use plain text and see if it escapes all tags, whether allowed or not.
-    // In order to test plain text, we have to enable the hidden variable for
-    // "show_fallback_format", which displays plain text in the format list.
-    $this->config('filter.settings')
-      ->set('always_show_fallback_choice', TRUE)
-      ->save();
-    $edit = array();
-    $edit['body[0][format]'] = $plain;
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
-    $this->drupalGet('node/' . $node->id());
-    $this->assertText(String::checkPlain($text), 'The "Plain text" text format escapes all HTML tags.');
-    $this->config('filter.settings')
-      ->set('always_show_fallback_choice', FALSE)
-      ->save();
-
-    // Switch user.
-    $this->drupalLogin($this->adminUser);
-
-    // Clean up.
-    // Allowed tags.
-    $edit = array();
-    $edit['filters[filter_html][settings][allowed_html]'] = '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>';
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $basic, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/manage/' . $basic);
-    $this->assertFieldByName('filters[filter_html][settings][allowed_html]', $edit['filters[filter_html][settings][allowed_html]'], 'Changes reverted.');
-
-    // Full HTML.
-    $edit = array();
-    $edit['roles[' . DRUPAL_AUTHENTICATED_RID . ']'] = FALSE;
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $full, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->assertRaw(t('The text format %format has been updated.', array('%format' => $format->label())), 'Full HTML format successfully reverted.');
-    $this->drupalGet('admin/config/content/formats/manage/' . $full);
-    $this->assertFieldByName('roles[' . DRUPAL_AUTHENTICATED_RID . ']', $edit['roles[' . DRUPAL_AUTHENTICATED_RID . ']'], 'Changes reverted.');
-
-    // Filter order.
-    $edit = array();
-    $edit['filters[' . $second_filter . '][weight]'] = 2;
-    $edit['filters[' . $first_filter . '][weight]'] = 1;
-    $this->drupalPostForm('admin/config/content/formats/manage/' . $basic, $edit, t('Save configuration'));
-    $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/manage/' . $basic);
-    $this->assertFieldByName('filters[' . $second_filter . '][weight]', $edit['filters[' . $second_filter . '][weight]'], 'Changes reverted.');
-    $this->assertFieldByName('filters[' . $first_filter . '][weight]', $edit['filters[' . $first_filter . '][weight]'], 'Changes reverted.');
-  }
-
-  /**
-   * Tests the URL filter settings form is properly validated.
-   */
-  function testUrlFilterAdmin() {
-    // The form does not save with an invalid filter URL length.
-    $edit = array(
-      'filters[filter_url][settings][filter_url_length]' => $this->randomMachineName(4),
-    );
-    $this->drupalPostForm('admin/config/content/formats/manage/basic_html', $edit, t('Save configuration'));
-    $this->assertNoRaw(t('The text format %format has been updated.', array('%format' => 'Basic HTML')));
-  }
-
-}
diff --git a/core/modules/forum/src/Tests/ForumNodeAccessTest.php b/core/modules/forum/src/Tests/ForumNodeAccessTest.php
index 34ddd35..e69de29 100644
--- a/core/modules/forum/src/Tests/ForumNodeAccessTest.php
+++ b/core/modules/forum/src/Tests/ForumNodeAccessTest.php
@@ -1,90 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\forum\Tests\ForumNodeAccessTest.
- */
-
-namespace Drupal\forum\Tests;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests forum block view for private node access.
- *
- * @group forum
- */
-class ForumNodeAccessTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('node', 'comment', 'forum', 'taxonomy', 'tracker', 'node_access_test', 'block');
-
-  protected function setUp() {
-    parent::setUp();
-    node_access_rebuild();
-    node_access_test_add_field(entity_load('node_type', 'forum'));
-    \Drupal::state()->set('node_access_test.private', TRUE);
-  }
-
-  /**
-   * Creates some users and creates a public node and a private node.
-   *
-   * Adds both active forum topics and new forum topics blocks to the sidebar.
-   * Tests to ensure private node/public node access is respected on blocks.
-   */
-  function testForumNodeAccess() {
-    // Create some users.
-    $access_user = $this->drupalCreateUser(array('node test view'));
-    $no_access_user = $this->drupalCreateUser();
-    $admin_user = $this->drupalCreateUser(array('access administration pages', 'administer modules', 'administer blocks', 'create forum content'));
-
-    $this->drupalLogin($admin_user);
-
-    // Create a private node.
-    $private_node_title = $this->randomMachineName(20);
-    $edit = array(
-      'title[0][value]' => $private_node_title,
-      'body[0][value]' => $this->randomMachineName(200),
-      'private[0][value]' => TRUE,
-    );
-    $this->drupalPostForm('node/add/forum', $edit, t('Save'), array('query' => array('forum_id' => 1)));
-    $private_node = $this->drupalGetNodeByTitle($private_node_title);
-    $this->assertTrue(!empty($private_node), 'New private forum node found in database.');
-
-    // Create a public node.
-    $public_node_title = $this->randomMachineName(20);
-    $edit = array(
-      'title[0][value]' => $public_node_title,
-      'body[0][value]' => $this->randomMachineName(200),
-    );
-    $this->drupalPostForm('node/add/forum', $edit, t('Save'), array('query' => array('forum_id' => 1)));
-    $public_node = $this->drupalGetNodeByTitle($public_node_title);
-    $this->assertTrue(!empty($public_node), 'New public forum node found in database.');
-
-
-    // Enable the new and active forum blocks.
-    $this->drupalPlaceBlock('forum_active_block');
-    $this->drupalPlaceBlock('forum_new_block');
-
-    // Test for $access_user.
-    $this->drupalLogin($access_user);
-    $this->drupalGet('');
-
-    // Ensure private node and public node are found.
-    $this->assertText($private_node->getTitle(), 'Private node found in block by $access_user');
-    $this->assertText($public_node->getTitle(), 'Public node found in block by $access_user');
-
-    // Test for $no_access_user.
-    $this->drupalLogin($no_access_user);
-    $this->drupalGet('');
-
-    // Ensure private node is not found but public is found.
-    $this->assertNoText($private_node->getTitle(), 'Private node not found in block by $no_access_user');
-    $this->assertText($public_node->getTitle(), 'Public node found in block by $no_access_user');
-  }
-
-}
diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
index e584fb7..e69de29 100644
--- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
@@ -1,531 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\language\Tests\LanguageUILanguageNegotiationTest.
- */
-
-namespace Drupal\language\Tests;
-
-use Drupal\Core\Url;
-use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser;
-use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSelected;
-use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSession;
-use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl;
-use Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUser;
-use Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUserAdmin;
-use Drupal\simpletest\WebTestBase;
-use Drupal\Core\Language\Language;
-use Drupal\Core\Language\LanguageInterface;
-use Symfony\Component\HttpFoundation\Request;
-use Drupal\language\LanguageNegotiatorInterface;
-use Drupal\block\Entity\Block;
-
-/**
- * Tests UI language switching.
- *
- * 1. URL (PATH) > DEFAULT
- *    UI Language base on URL prefix, browser language preference has no
- *    influence:
- *      admin/config
- *        UI in site default language
- *      zh-hans/admin/config
- *        UI in Chinese
- *      blah-blah/admin/config
- *        404
- * 2. URL (PATH) > BROWSER > DEFAULT
- *        admin/config
- *          UI in user's browser language preference if the site has that
- *          language added, if not, the default language
- *        zh-hans/admin/config
- *          UI in Chinese
- *        blah-blah/admin/config
- *          404
- * 3. URL (DOMAIN) > DEFAULT
- *        http://example.com/admin/config
- *          UI language in site default
- *        http://example.cn/admin/config
- *          UI language in Chinese
- *
- * @group language
- */
-class LanguageUILanguageNegotiationTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * We marginally use interface translation functionality here, so need to use
-   * the locale module instead of language only, but the 90% of the test is
-   * about the negotiation process which is solely in language module.
-   *
-   * @var array
-   */
-  public static $modules = array('locale', 'language_test', 'block', 'user', 'content_translation');
-
-  protected function setUp() {
-    parent::setUp();
-
-    $admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
-    $this->drupalLogin($admin_user);
-  }
-
-  /**
-   * Tests for language switching by URL path.
-   */
-  function testUILanguageNegotiation() {
-    // A few languages to switch to.
-    // This one is unknown, should get the default lang version.
-    $langcode_unknown = 'blah-blah';
-    // For testing browser lang preference.
-    $langcode_browser_fallback = 'vi';
-    // For testing path prefix.
-    $langcode = 'zh-hans';
-    // For setting browser language preference to 'vi'.
-    $http_header_browser_fallback = array("Accept-Language: $langcode_browser_fallback;q=1");
-    // For setting browser language preference to some unknown.
-    $http_header_blah = array("Accept-Language: blah;q=1");
-
-    // Setup the site languages by installing two languages.
-    // Set the default language in order for the translated string to be registered
-    // into database when seen by t(). Without doing this, our target string
-    // is for some reason not found when doing translate search. This might
-    // be some bug.
-    $default_language = \Drupal::languageManager()->getDefaultLanguage();
-    ConfigurableLanguage::createFromLangcode($langcode_browser_fallback)->save();
-    $this->config('system.site')->set('langcode', $langcode_browser_fallback)->save();
-    ConfigurableLanguage::createFromLangcode($langcode)->save();
-
-    // We will look for this string in the admin/config screen to see if the
-    // corresponding translated string is shown.
-    $default_string = 'Hide descriptions';
-
-    // First visit this page to make sure our target string is searchable.
-    $this->drupalGet('admin/config');
-
-    // Now the t()'ed string is in db so switch the language back to default.
-    // This will rebuild the container so we need to rebuild the container in
-    // the test environment.
-    $this->config('system.site')->set('langcode', $default_language->getId())->save();
-    $this->config('language.negotiation')->set('url.prefixes.en', '')->save();
-    $this->rebuildContainer();
-
-    // Translate the string.
-    $language_browser_fallback_string = "In $langcode_browser_fallback In $langcode_browser_fallback In $langcode_browser_fallback";
-    $language_string = "In $langcode In $langcode In $langcode";
-    // Do a translate search of our target string.
-    $search = array(
-      'string' => $default_string,
-      'langcode' => $langcode_browser_fallback,
-    );
-    $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
-    $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
-    $edit = array(
-      $lid => $language_browser_fallback_string,
-    );
-    $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations'));
-
-    $search = array(
-      'string' => $default_string,
-      'langcode' => $langcode,
-    );
-    $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
-    $textarea = current($this->xpath('//textarea'));
-    $lid = (string) $textarea[0]['name'];
-    $edit = array(
-      $lid => $language_string,
-    );
-    $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations'));
-
-    // Configure selected language negotiation to use zh-hans.
-    $edit = array('selected_langcode' => $langcode);
-    $this->drupalPostForm('admin/config/regional/language/detection/selected', $edit, t('Save configuration'));
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $language_string,
-      'expected_method_id' => LanguageNegotiationSelected::METHOD_ID,
-      'http_header' => $http_header_browser_fallback,
-      'message' => 'SELECTED: UI language is switched based on selected language.',
-    );
-    $this->runTest($test);
-
-    // An invalid language is selected.
-    $this->config('language.negotiation')->set('selected_langcode', NULL)->save();
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => $http_header_browser_fallback,
-      'message' => 'SELECTED > DEFAULT: UI language is switched based on selected language.',
-    );
-    $this->runTest($test);
-
-    // No selected language is available.
-    $this->config('language.negotiation')->set('selected_langcode', $langcode_unknown)->save();
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => $http_header_browser_fallback,
-      'message' => 'SELECTED > DEFAULT: UI language is switched based on selected language.',
-    );
-    $this->runTest($test);
-
-    $tests = array(
-      // Default, browser preference should have no influence.
-      array(
-        'language_negotiation' => array(LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-        'path' => 'admin/config',
-        'expect' => $default_string,
-        'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'URL (PATH) > DEFAULT: no language prefix, UI language is default and the browser language preference setting is not used.',
-      ),
-      // Language prefix.
-      array(
-        'language_negotiation' => array(LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-        'path' => "$langcode/admin/config",
-        'expect' => $language_string,
-        'expected_method_id' => LanguageNegotiationUrl::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'URL (PATH) > DEFAULT: with language prefix, UI language is switched based on path prefix',
-      ),
-      // Default, go by browser preference.
-      array(
-        'language_negotiation' => array(LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationBrowser::METHOD_ID),
-        'path' => 'admin/config',
-        'expect' => $language_browser_fallback_string,
-        'expected_method_id' => LanguageNegotiationBrowser::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'URL (PATH) > BROWSER: no language prefix, UI language is determined by browser language preference',
-      ),
-      // Prefix, switch to the language.
-      array(
-        'language_negotiation' => array(LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationBrowser::METHOD_ID),
-        'path' => "$langcode/admin/config",
-        'expect' => $language_string,
-        'expected_method_id' => LanguageNegotiationUrl::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'URL (PATH) > BROWSER: with language prefix, UI language is based on path prefix',
-      ),
-      // Default, browser language preference is not one of site's lang.
-      array(
-        'language_negotiation' => array(LanguageNegotiationUrl::METHOD_ID, LanguageNegotiationBrowser::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-        'path' => 'admin/config',
-        'expect' => $default_string,
-        'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-        'http_header' => $http_header_blah,
-        'message' => 'URL (PATH) > BROWSER > DEFAULT: no language prefix and browser language preference set to unknown language should use default language',
-      ),
-    );
-
-    foreach ($tests as $test) {
-      $this->runTest($test);
-    }
-
-    // Unknown language prefix should return 404.
-    $definitions = \Drupal::languageManager()->getNegotiator()->getNegotiationMethods();
-    $this->config('language.types')
-      ->set('negotiation.' . LanguageInterface::TYPE_INTERFACE . '.enabled', array_flip(array_keys($definitions)))
-      ->save();
-    $this->drupalGet("$langcode_unknown/admin/config", array(), $http_header_browser_fallback);
-    $this->assertResponse(404, "Unknown language path prefix should return 404");
-
-    // Set preferred langcode for user to NULL.
-    $account = $this->loggedInUser;
-    $account->preferred_langcode = NULL;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUser::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER > DEFAULT: no preferred user language setting, the UI language is default',
-    );
-    $this->runTest($test);
-
-    // Set preferred langcode for user to unknown language.
-    $account = $this->loggedInUser;
-    $account->preferred_langcode = $langcode_unknown;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUser::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER > DEFAULT: invalid preferred user language setting, the UI language is default',
-    );
-    $this->runTest($test);
-
-    // Set preferred langcode for user to non default.
-    $account->preferred_langcode = $langcode;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUser::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $language_string,
-      'expected_method_id' => LanguageNegotiationUser::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER > DEFAULT: defined prefereed user language setting, the UI language is based on user setting',
-    );
-    $this->runTest($test);
-
-    // Set preferred admin langcode for user to NULL.
-    $account->preferred_admin_langcode = NULL;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUserAdmin::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER ADMIN > DEFAULT: no preferred user admin language setting, the UI language is default',
-    );
-    $this->runTest($test);
-
-    // Set preferred admin langcode for user to unknown language.
-    $account->preferred_admin_langcode = $langcode_unknown;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUserAdmin::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $default_string,
-      'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER ADMIN > DEFAULT: invalid preferred user admin language setting, the UI language is default',
-    );
-    $this->runTest($test);
-
-    // Set preferred admin langcode for user to non default.
-    $account->preferred_admin_langcode = $langcode;
-    $account->save();
-
-    $test = array(
-      'language_negotiation' => array(LanguageNegotiationUserAdmin::METHOD_ID, LanguageNegotiationSelected::METHOD_ID),
-      'path' => 'admin/config',
-      'expect' => $language_string,
-      'expected_method_id' => LanguageNegotiationUserAdmin::METHOD_ID,
-      'http_header' => array(),
-      'message' => 'USER ADMIN > DEFAULT: defined prefereed user admin language setting, the UI language is based on user setting',
-    );
-    $this->runTest($test);
-
-    // Go by session preference.
-    $language_negotiation_session_param = $this->randomMachineName();
-    $edit = array('language_negotiation_session_param' => $language_negotiation_session_param);
-    $this->drupalPostForm('admin/config/regional/language/detection/session', $edit, t('Save configuration'));
-    $tests = array(
-      array(
-        'language_negotiation' => array(LanguageNegotiationSession::METHOD_ID),
-        'path' => "admin/config",
-        'expect' => $default_string,
-        'expected_method_id' => LanguageNegotiatorInterface::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'SESSION > DEFAULT: no language given, the UI language is default',
-      ),
-      array(
-        'language_negotiation' => array(LanguageNegotiationSession::METHOD_ID),
-        'path' => 'admin/config',
-        'path_options' => ['query' => [$language_negotiation_session_param => $langcode]],
-        'expect' => $language_string,
-        'expected_method_id' => LanguageNegotiationSession::METHOD_ID,
-        'http_header' => $http_header_browser_fallback,
-        'message' => 'SESSION > DEFAULT: language given, UI language is determined by session language preference',
-      ),
-    );
-    foreach ($tests as $test) {
-      $this->runTest($test);
-    }
-  }
-
-  protected function runTest($test) {
-    $test += array('path_options' => []);
-    if (!empty($test['language_negotiation'])) {
-      $method_weights = array_flip($test['language_negotiation']);
-      $this->container->get('language_negotiator')->saveConfiguration(LanguageInterface::TYPE_INTERFACE, $method_weights);
-    }
-    if (!empty($test['language_negotiation_url_part'])) {
-      $this->config('language.negotiation')
-        ->set('url.source', $test['language_negotiation_url_part'])
-        ->save();
-    }
-    if (!empty($test['language_test_domain'])) {
-      \Drupal::state()->set('language_test.domain', $test['language_test_domain']);
-    }
-    $this->container->get('language_manager')->reset();
-    $this->drupalGet($test['path'], $test['path_options'], $test['http_header']);
-    $this->assertText($test['expect'], $test['message']);
-    $this->assertText(t('Language negotiation method: @name', array('@name' => $test['expected_method_id'])));
-  }
-
-  /**
-   * Test URL language detection when the requested URL has no language.
-   */
-  function testUrlLanguageFallback() {
-    // Add the Italian language.
-    $langcode_browser_fallback = 'it';
-    ConfigurableLanguage::createFromLangcode($langcode_browser_fallback)->save();
-    $languages = $this->container->get('language_manager')->getLanguages();
-
-    // Enable the path prefix for the default language: this way any unprefixed
-    // URL must have a valid fallback value.
-    $edit = array('prefix[en]' => 'en');
-    $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration'));
-
-    // Enable browser and URL language detection.
-    $edit = array(
-      'language_interface[enabled][language-browser]' => TRUE,
-      'language_interface[enabled][language-url]' => TRUE,
-      'language_interface[weight][language-browser]' => -8,
-      'language_interface[weight][language-url]' => -10,
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
-    $this->drupalGet('admin/config/regional/language/detection');
-
-    // Enable the language switcher block.
-    $this->drupalPlaceBlock('language_block:' . LanguageInterface::TYPE_INTERFACE, array('id' => 'test_language_block'));
-
-    // Log out, because for anonymous users, the "active" class is set by PHP
-    // (which means we can easily test it here), whereas for authenticated users
-    // it is set by JavaScript.
-    $this->drupalLogout();
-
-    // Access the front page without specifying any valid URL language prefix
-    // and having as browser language preference a non-default language.
-    $http_header = array("Accept-Language: $langcode_browser_fallback;q=1");
-    $language = new Language(array('id' => ''));
-    $this->drupalGet('', array('language' => $language), $http_header);
-
-    // Check that the language switcher active link matches the given browser
-    // language.
-    $args = array(':id' => 'block-test-language-block', ':url' => base_path() . $GLOBALS['script_path'] . $langcode_browser_fallback);
-    $fields = $this->xpath('//div[@id=:id]//a[@class="language-link active" and starts-with(@href, :url)]', $args);
-    $this->assertTrue($fields[0] == $languages[$langcode_browser_fallback]->getName(), 'The browser language is the URL active language');
-
-    // Check that URLs are rewritten using the given browser language.
-    $fields = $this->xpath('//strong[@class="site-name"]/a[@rel="home" and @href=:url]', $args);
-    $this->assertTrue($fields[0] == 'Drupal', 'URLs are rewritten using the browser language.');
-  }
-
-  /**
-   * Tests URL handling when separate domains are used for multiple languages.
-   */
-  function testLanguageDomain() {
-    global $base_url;
-
-    // Get the current host URI we're running on.
-    $base_url_host = parse_url($base_url, PHP_URL_HOST);
-
-    // Add the Italian language.
-    ConfigurableLanguage::createFromLangcode('it')->save();
-
-    $languages = $this->container->get('language_manager')->getLanguages();
-
-    // Enable browser and URL language detection.
-    $edit = array(
-      'language_interface[enabled][language-url]' => TRUE,
-      'language_interface[weight][language-url]' => -10,
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
-
-    // Do not allow blank domain.
-    $edit = array(
-      'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN,
-      'domain[en]' => '',
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration'));
-    $this->assertText('The domain may not be left blank for English', 'The form does not allow blank domains.');
-    $this->rebuildContainer();
-
-    // Change the domain for the Italian language.
-    $edit = array(
-      'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN,
-      'domain[en]' => $base_url_host,
-      'domain[it]' => 'it.example.com',
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration'));
-    $this->assertText('The configuration options have been saved', 'Domain configuration is saved.');
-    $this->rebuildContainer();
-
-    // Build the link we're going to test.
-    $link = 'it.example.com' . rtrim(base_path(), '/') . '/admin';
-
-    // Test URL in another language: http://it.example.com/admin.
-    // Base path gives problems on the testbot, so $correct_link is hard-coded.
-    // @see UrlAlterFunctionalTest::assertUrlOutboundAlter (path.test).
-    $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString();
-    $url_scheme = \Drupal::request()->isSecure() ? 'https://' : 'http://';
-    $correct_link = $url_scheme . $link;
-    $this->assertEqual($italian_url, $correct_link, format_string('The right URL (@url) in accordance with the chosen language', array('@url' => $italian_url)));
-
-    // Test HTTPS via options.
-    $italian_url = Url::fromRoute('system.admin', [], ['https' => TRUE, 'language' => $languages['it']])->toString();
-    $correct_link = 'https://' . $link;
-    $this->assertTrue($italian_url == $correct_link, format_string('The right HTTPS URL (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
-
-    // Test HTTPS via current URL scheme.
-    $request = Request::create('', 'GET', array(), array(), array(), array('HTTPS' => 'on'));
-    $this->container->get('request_stack')->push($request);
-    $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString();
-    $correct_link = 'https://' . $link;
-    $this->assertTrue($italian_url == $correct_link, format_string('The right URL (via current URL scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
-  }
-
-  /**
-   * Tests persistence of negotiation settings for the content language type.
-   */
-  public function testContentCustomization() {
-    // Customize content language settings from their defaults.
-    $edit = array(
-      'language_content[configurable]' => TRUE,
-      'language_content[enabled][language-url]' => FALSE,
-      'language_content[enabled][language-session]' => TRUE,
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
-
-    // Check if configurability persisted.
-    $config = $this->config('language.types');
-    $this->assertTrue(in_array('language_interface', $config->get('configurable')), 'Interface language is configurable.');
-    $this->assertTrue(in_array('language_content', $config->get('configurable')), 'Content language is configurable.');
-
-    // Ensure configuration was saved.
-    $this->assertFalse(array_key_exists('language-url', $config->get('negotiation.language_content.enabled')), 'URL negotiation is not enabled for content.');
-    $this->assertTrue(array_key_exists('language-session', $config->get('negotiation.language_content.enabled')), 'Session negotiation is enabled for content.');
-  }
-
-  /**
-   * Tests if the language switcher block gets deleted when a language type has been made not configurable.
-   */
-  public function testDisableLanguageSwitcher() {
-    $block_id = 'test_language_block';
-
-    // Enable the language switcher block.
-    $this->drupalPlaceBlock('language_block:' . LanguageInterface::TYPE_CONTENT, array('id' => $block_id));
-
-    // Check if the language switcher block has been created.
-    $block = Block::load($block_id);
-    $this->assertTrue($block, 'Language switcher block was created.');
-
-    // Make sure language_content is not configurable.
-    $edit = array(
-      'language_content[configurable]' => FALSE,
-    );
-    $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
-    $this->assertResponse(200);
-
-    // Check if the language switcher block has been removed.
-    $block = Block::load($block_id);
-    $this->assertFalse($block, 'Language switcher block was removed.');
-  }
-}
diff --git a/core/modules/node/src/Tests/NodeAccessBaseTableTest.php b/core/modules/node/src/Tests/NodeAccessBaseTableTest.php
index d5e4dd4..e69de29 100644
--- a/core/modules/node/src/Tests/NodeAccessBaseTableTest.php
+++ b/core/modules/node/src/Tests/NodeAccessBaseTableTest.php
@@ -1,177 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\node\Tests\NodeAccessBaseTableTest.
- */
-
-namespace Drupal\node\Tests;
-
-/**
- * Tests behavior of the node access subsystem if the base table is not node.
- *
- * @group node
- */
-class NodeAccessBaseTableTest extends NodeTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('node_access_test', 'views');
-
-  /**
-   * The installation profile to use with this test.
-   *
-   * This test class requires the "tags" taxonomy field.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
-
-  protected function setUp() {
-    parent::setUp();
-
-    node_access_test_add_field(entity_load('node_type', 'article'));
-
-    node_access_rebuild();
-    \Drupal::state()->set('node_access_test.private', TRUE);
-  }
-
-  /**
-   * Tests the "private" node access functionality.
-   *
-   * - Create 2 users with "access content" and "create article" permissions.
-   * - Each user creates one private and one not private article.
-   *
-   * - Test that each user can view the other user's non-private article.
-   * - Test that each user cannot view the other user's private article.
-   * - Test that each user finds only appropriate (non-private + own private)
-   *   in taxonomy listing.
-   * - Create another user with 'view any private content'.
-   * - Test that user 4 can view all content created above.
-   * - Test that user 4 can view all content on taxonomy listing.
-   */
-  function testNodeAccessBasic() {
-    $num_simple_users = 2;
-    $simple_users = array();
-
-    // nodes keyed by uid and nid: $nodes[$uid][$nid] = $is_private;
-    $this->nodesByUser = array();
-    $titles = array(); // Titles keyed by nid
-    $private_nodes = array(); // Array of nids marked private.
-    for ($i = 0; $i < $num_simple_users; $i++) {
-      $simple_users[$i] = $this->drupalCreateUser(array('access content', 'create article content'));
-    }
-    foreach ($simple_users as $this->webUser) {
-      $this->drupalLogin($this->webUser);
-      foreach (array(0 => 'Public', 1 => 'Private') as $is_private => $type) {
-        $edit = array(
-          'title[0][value]' => t('@private_public Article created by @user', array('@private_public' => $type, '@user' => $this->webUser->getUsername())),
-        );
-        if ($is_private) {
-          $edit['private[0][value]'] = TRUE;
-          $edit['body[0][value]'] = 'private node';
-          $edit['field_tags'] = 'private';
-        }
-        else {
-          $edit['body[0][value]'] = 'public node';
-          $edit['field_tags'] = 'public';
-        }
-
-        $this->drupalPostForm('node/add/article', $edit, t('Save'));
-        $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-        $this->assertEqual($is_private, (int)$node->private->value, 'The private status of the node was properly set in the node_access_test table.');
-        if ($is_private) {
-          $private_nodes[] = $node->id();
-        }
-        $titles[$node->id()] = $edit['title[0][value]'];
-        $this->nodesByUser[$this->webUser->id()][$node->id()] = $is_private;
-      }
-    }
-    $this->publicTid = db_query('SELECT tid FROM {taxonomy_term_field_data} WHERE name = :name AND default_langcode = 1', array(':name' => 'public'))->fetchField();
-    $this->privateTid = db_query('SELECT tid FROM {taxonomy_term_field_data} WHERE name = :name AND default_langcode = 1', array(':name' => 'private'))->fetchField();
-    $this->assertTrue($this->publicTid, 'Public tid was found');
-    $this->assertTrue($this->privateTid, 'Private tid was found');
-    foreach ($simple_users as $this->webUser) {
-      $this->drupalLogin($this->webUser);
-      // Check own nodes to see that all are readable.
-      foreach ($this->nodesByUser as $uid => $data) {
-        foreach ($data as $nid => $is_private) {
-          $this->drupalGet('node/' . $nid);
-          if ($is_private) {
-            $should_be_visible = $uid == $this->webUser->id();
-          }
-          else {
-            $should_be_visible = TRUE;
-          }
-          $this->assertResponse($should_be_visible ? 200 : 403, strtr('A %private node by user %uid is %visible for user %current_uid.', array(
-            '%private' => $is_private ? 'private' : 'public',
-            '%uid' => $uid,
-            '%visible' => $should_be_visible ? 'visible' : 'not visible',
-            '%current_uid' => $this->webUser->id(),
-          )));
-        }
-      }
-
-      // Check to see that the correct nodes are shown on taxonomy/private
-      // and taxonomy/public.
-      $this->assertTaxonomyPage(FALSE);
-    }
-
-    // Now test that a user with 'node test view' permissions can view content.
-    $access_user = $this->drupalCreateUser(array('access content', 'create article content', 'node test view', 'search content'));
-    $this->drupalLogin($access_user);
-
-    foreach ($this->nodesByUser as $private_status) {
-      foreach ($private_status as $nid => $is_private) {
-        $this->drupalGet('node/' . $nid);
-        $this->assertResponse(200);
-      }
-    }
-
-    // This user should be able to see all of the nodes on the relevant
-    // taxonomy pages.
-    $this->assertTaxonomyPage(TRUE);
-  }
-
-  /**
-   * Checks taxonomy/term listings to ensure only accessible nodes are listed.
-   *
-   * @param $is_admin
-   *   A boolean indicating whether the current user is an administrator. If
-   *   TRUE, all nodes should be listed. If FALSE, only public nodes and the
-   *   user's own private nodes should be listed.
-   */
-  protected function assertTaxonomyPage($is_admin) {
-    foreach (array($this->publicTid, $this->privateTid) as $tid_is_private => $tid) {
-      $this->drupalGet("taxonomy/term/$tid");
-      $this->nids_visible = array();
-      foreach ($this->xpath("//a[text()='Read more']") as $link) {
-        // See also testTranslationRendering() in NodeTranslationUITest.
-        $this->assertTrue(preg_match('|node/(\d+)$|', (string) $link['href'], $matches), 'Read more points to a node');
-        $this->nids_visible[$matches[1]] = TRUE;
-      }
-      foreach ($this->nodesByUser as $uid => $data) {
-        foreach ($data as $nid => $is_private) {
-          // Private nodes should be visible on the private term page,
-          // public nodes should be visible on the public term page.
-          $should_be_visible = $tid_is_private == $is_private;
-          // Non-administrators can only see their own nodes on the private
-          // term page.
-          if (!$is_admin && $tid_is_private) {
-            $should_be_visible = $should_be_visible && $uid == $this->webUser->id();
-          }
-          $this->assertIdentical(isset($this->nids_visible[$nid]), $should_be_visible, strtr('A %private node by user %uid is %visible for user %current_uid on the %tid_is_private page.', array(
-            '%private' => $is_private ? 'private' : 'public',
-            '%uid' => $uid,
-            '%visible' => isset($this->nids_visible[$nid]) ? 'visible' : 'not visible',
-            '%current_uid' => $this->webUser->id(),
-            '%tid_is_private' => $tid_is_private ? 'private' : 'public',
-          )));
-        }
-      }
-    }
-  }
-}
diff --git a/core/modules/node/src/Tests/NodeCreationTest.php b/core/modules/node/src/Tests/NodeCreationTest.php
index 3caf0bd..e69de29 100644
--- a/core/modules/node/src/Tests/NodeCreationTest.php
+++ b/core/modules/node/src/Tests/NodeCreationTest.php
@@ -1,188 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\node\Tests\NodeCreationTest.
- */
-
-namespace Drupal\node\Tests;
-
-use Drupal\Core\Database\Database;
-use Drupal\Core\Language\LanguageInterface;
-
-/**
- * Create a node and test saving it.
- *
- * @group node
- */
-class NodeCreationTest extends NodeTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * Enable dummy module that implements hook_ENTITY_TYPE_insert() for
-   * exceptions (function node_test_exception_node_insert() ).
-   *
-   * @var array
-   */
-  public static $modules = array('node_test_exception', 'dblog', 'test_page_test');
-
-  protected function setUp() {
-    parent::setUp();
-
-    $web_user = $this->drupalCreateUser(array('create page content', 'edit own page content'));
-    $this->drupalLogin($web_user);
-  }
-
-  /**
-   * Creates a "Basic page" node and verifies its consistency in the database.
-   */
-  function testNodeCreation() {
-    // Test /node/add page with only one content type.
-    entity_load('node_type', 'article')->delete();
-    $this->drupalGet('node/add');
-    $this->assertResponse(200);
-    $this->assertUrl('node/add/page');
-    // Create a node.
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName(8);
-    $edit['body[0][value]'] = $this->randomMachineName(16);
-    $this->drupalPostForm('node/add/page', $edit, t('Save'));
-
-    // Check that the Basic page has been created.
-    $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.');
-
-    // Check that the node exists in the database.
-    $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-    $this->assertTrue($node, 'Node found in database.');
-
-    // Verify that pages do not show submitted information by default.
-    $this->drupalGet('node/' . $node->id());
-    $this->assertNoText($node->getOwner()->getUsername());
-    $this->assertNoText(format_date($node->getCreatedTime()));
-
-    // Change the node type setting to show submitted by information.
-    $node_type = entity_load('node_type', 'page');
-    $node_type->setDisplaySubmitted(TRUE);
-    $node_type->save();
-
-    $this->drupalGet('node/' . $node->id());
-    $this->assertText($node->getOwner()->getUsername());
-    $this->assertText(format_date($node->getCreatedTime()));
-  }
-
-  /**
-   * Verifies that a transaction rolls back the failed creation.
-   */
-  function testFailedPageCreation() {
-    // Create a node.
-    $edit = array(
-      'uid'      => $this->loggedInUser->id(),
-      'name'     => $this->loggedInUser->name,
-      'type'     => 'page',
-      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-      'title'    => 'testing_transaction_exception',
-    );
-
-    try {
-      // An exception is generated by node_test_exception_node_insert() if the
-      // title is 'testing_transaction_exception'.
-      entity_create('node', $edit)->save();
-      $this->fail(t('Expected exception has not been thrown.'));
-    }
-    catch (\Exception $e) {
-      $this->pass(t('Expected exception has been thrown.'));
-    }
-
-    if (Database::getConnection()->supportsTransactions()) {
-      // Check that the node does not exist in the database.
-      $node = $this->drupalGetNodeByTitle($edit['title']);
-      $this->assertFalse($node, 'Transactions supported, and node not found in database.');
-    }
-    else {
-      // Check that the node exists in the database.
-      $node = $this->drupalGetNodeByTitle($edit['title']);
-      $this->assertTrue($node, 'Transactions not supported, and node found in database.');
-
-      // Check that the failed rollback was logged.
-      $records = db_query("SELECT wid FROM {watchdog} WHERE message LIKE 'Explicit rollback failed%'")->fetchAll();
-      $this->assertTrue(count($records) > 0, 'Transactions not supported, and rollback error logged to watchdog.');
-    }
-
-    // Check that the rollback error was logged.
-    $records = db_query("SELECT wid FROM {watchdog} WHERE variables LIKE '%Test exception for rollback.%'")->fetchAll();
-    $this->assertTrue(count($records) > 0, 'Rollback explanatory error logged to watchdog.');
-  }
-
-  /**
-   * Creates an unpublished node and confirms correct redirect behavior.
-   */
-  function testUnpublishedNodeCreation() {
-    // Set the front page to the test page.
-    $this->config('system.site')->set('page.front', 'test-page')->save();
-
-    // Set "Basic page" content type to be unpublished by default.
-    $fields = \Drupal::entityManager()->getFieldDefinitions('node', 'page');
-    $fields['status']->getConfig('page')
-      ->setDefaultValue(FALSE)
-      ->save();
-
-    // Create a node.
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName(8);
-    $edit['body[0][value]'] = $this->randomMachineName(16);
-    $this->drupalPostForm('node/add/page', $edit, t('Save'));
-
-    // Check that the user was redirected to the home page.
-    $this->assertUrl('');
-    $this->assertText(t('Test page text'));
-
-    // Confirm that the node was created.
-    $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]'])));
-  }
-
-  /**
-   * Tests the author autocompletion textfield.
-   */
-  public function testAuthorAutocomplete() {
-    $admin_user = $this->drupalCreateUser(array('administer nodes', 'create page content'));
-    $this->drupalLogin($admin_user);
-
-    $this->drupalGet('node/add/page');
-
-    $result = $this->xpath('//input[@id="edit-uid-0-value" and contains(@data-autocomplete-path, "user/autocomplete")]');
-    $this->assertEqual(count($result), 0, 'No autocompletion without access user profiles.');
-
-    $admin_user = $this->drupalCreateUser(array('administer nodes', 'create page content', 'access user profiles'));
-    $this->drupalLogin($admin_user);
-
-    $this->drupalGet('node/add/page');
-
-    $result = $this->xpath('//input[@id="edit-uid-0-target-id" and contains(@data-autocomplete-path, "/entity_reference_autocomplete/user/default")]');
-    $this->assertEqual(count($result), 1, 'Ensure that the user does have access to the autocompletion');
-  }
-
-  /**
-   * Check node/add when no node types exist.
-   */
-  function testNodeAddWithoutContentTypes () {
-    $this->drupalGet('node/add');
-    $this->assertResponse(200);
-    $this->assertNoLinkByHref('/admin/structure/types/add');
-
-    // Test /node/add page without content types.
-    foreach (entity_load_multiple('node_type') as $entity ) {
-      $entity->delete();
-    }
-
-    $this->drupalGet('node/add');
-    $this->assertResponse(403);
-
-    $admin_content_types = $this->drupalCreateUser(array('administer content types'));
-    $this->drupalLogin($admin_content_types);
-
-    $this->drupalGet('node/add');
-
-    $this->assertLinkByHref('/admin/structure/types/add');
-  }
-}
diff --git a/core/modules/node/src/Tests/PageEditTest.php b/core/modules/node/src/Tests/PageEditTest.php
index b2d818b..e69de29 100644
--- a/core/modules/node/src/Tests/PageEditTest.php
+++ b/core/modules/node/src/Tests/PageEditTest.php
@@ -1,135 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\node\Tests\PageEditTest.
- */
-
-namespace Drupal\node\Tests;
-
-/**
- * Create a node and test node edit functionality.
- *
- * @group node
- */
-class PageEditTest extends NodeTestBase {
-  protected $webUser;
-  protected $adminUser;
-
-  protected function setUp() {
-    parent::setUp();
-
-    $this->webUser = $this->drupalCreateUser(array('edit own page content', 'create page content'));
-    $this->adminUser = $this->drupalCreateUser(array('bypass node access', 'administer nodes'));
-  }
-
-  /**
-   * Checks node edit functionality.
-   */
-  function testPageEdit() {
-    $this->drupalLogin($this->webUser);
-
-    $title_key = 'title[0][value]';
-    $body_key = 'body[0][value]';
-    // Create node to edit.
-    $edit = array();
-    $edit[$title_key] = $this->randomMachineName(8);
-    $edit[$body_key] = $this->randomMachineName(16);
-    $this->drupalPostForm('node/add/page', $edit, t('Save'));
-
-    // Check that the node exists in the database.
-    $node = $this->drupalGetNodeByTitle($edit[$title_key]);
-    $this->assertTrue($node, 'Node found in database.');
-
-    // Check that "edit" link points to correct page.
-    $this->clickLink(t('Edit'));
-    $this->assertUrl($node->url('edit-form', ['absolute' => TRUE]));
-
-    // Check that the title and body fields are displayed with the correct values.
-    $active = '<span class="visually-hidden">' . t('(active tab)') . '</span>';
-    $link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active));
-    $this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.');
-    $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
-    $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');
-
-    // Edit the content of the node.
-    $edit = array();
-    $edit[$title_key] = $this->randomMachineName(8);
-    $edit[$body_key] = $this->randomMachineName(16);
-    // Stay on the current page, without reloading.
-    $this->drupalPostForm(NULL, $edit, t('Save'));
-
-    // Check that the title and body fields are displayed with the updated values.
-    $this->assertText($edit[$title_key], 'Title displayed.');
-    $this->assertText($edit[$body_key], 'Body displayed.');
-
-    // Login as a second administrator user.
-    $second_web_user = $this->drupalCreateUser(array('administer nodes', 'edit any page content'));
-    $this->drupalLogin($second_web_user);
-    // Edit the same node, creating a new revision.
-    $this->drupalGet("node/" . $node->id() . "/edit");
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName(8);
-    $edit[$body_key] = $this->randomMachineName(16);
-    $edit['revision'] = TRUE;
-    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
-
-    // Ensure that the node revision has been created.
-    $revised_node = $this->drupalGetNodeByTitle($edit['title[0][value]'], TRUE);
-    $this->assertNotIdentical($node->getRevisionId(), $revised_node->getRevisionId(), 'A new revision has been created.');
-    // Ensure that the node author is preserved when it was not changed in the
-    // edit form.
-    $this->assertIdentical($node->getOwnerId(), $revised_node->getOwnerId(), 'The node author has been preserved.');
-    // Ensure that the revision authors are different since the revisions were
-    // made by different users.
-    $first_node_version = node_revision_load($node->getRevisionId());
-    $second_node_version = node_revision_load($revised_node->getRevisionId());
-    $this->assertNotIdentical($first_node_version->getRevisionAuthor()->id(), $second_node_version->getRevisionAuthor()->id(), 'Each revision has a distinct user.');
-  }
-
-  /**
-   * Tests changing a node's "authored by" field.
-   */
-  function testPageAuthoredBy() {
-    $node_storage = $this->container->get('entity.manager')->getStorage('node');
-    $this->drupalLogin($this->adminUser);
-
-    // Create node to edit.
-    $body_key = 'body[0][value]';
-    $edit = array();
-    $edit['title[0][value]'] = $this->randomMachineName(8);
-    $edit[$body_key] = $this->randomMachineName(16);
-    $this->drupalPostForm('node/add/page', $edit, t('Save and publish'));
-
-    // Check that the node was authored by the currently logged in user.
-    $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
-    $this->assertIdentical($node->getOwnerId(), $this->adminUser->id(), 'Node authored by admin user.');
-
-    // Try to change the 'authored by' field to an invalid user name.
-    $edit = array(
-      'uid[0][target_id]' => 'invalid-name',
-    );
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
-    $this->assertRaw(t('There are no entities matching "%name".', array('%name' => 'invalid-name')));
-
-    // Change the authored by field to the anonymous user (uid 0).
-    $edit['uid[0][target_id]'] = 'Anonymous (0)';
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
-    $node_storage->resetCache(array($node->id()));
-    $node = $node_storage->load($node->id());
-    $this->assertIdentical($node->getOwnerId(), '0', 'Node authored by anonymous user.');
-
-    // Change the authored by field to another user's name (that is not
-    // logged in).
-    $edit['uid[0][target_id]'] = $this->webUser->getUsername();
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
-    $node_storage->resetCache(array($node->id()));
-    $node = $node_storage->load($node->id());
-    $this->assertIdentical($node->getOwnerId(), $this->webUser->id(), 'Node authored by normal user.');
-
-    // Check that normal users cannot change the authored by information.
-    $this->drupalLogin($this->webUser);
-    $this->drupalGet('node/' . $node->id() . '/edit');
-    $this->assertNoFieldByName('uid[0][target_id]');
-  }
-}
diff --git a/core/modules/rest/src/Tests/CreateTest.php b/core/modules/rest/src/Tests/CreateTest.php
index d125f1b..e69de29 100644
--- a/core/modules/rest/src/Tests/CreateTest.php
+++ b/core/modules/rest/src/Tests/CreateTest.php
@@ -1,404 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\rest\test\CreateTest.
- */
-
-namespace Drupal\rest\Tests;
-
-use Drupal\Component\Serialization\Json;
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\entity_test\Entity\EntityTest;
-use Drupal\node\Entity\Node;
-use Drupal\user\Entity\User;
-
-/**
- * Tests the creation of resources.
- *
- * @group rest
- */
-class CreateTest extends RESTTestBase {
-
-  /**
-   * Modules to install.
-   *
-   * @var array
-   */
-  public static $modules = array('hal', 'rest', 'entity_test');
-
-  /**
-   * The 'serializer' service.
-   *
-   * @var \Symfony\Component\Serializer\Serializer
-   */
-  protected $serializer;
-
-  protected function setUp() {
-    parent::setUp();
-    // Get the 'serializer' service.
-    $this->serializer = $this->container->get('serializer');
-  }
-
-  /**
-   * Try to create a resource which is not REST API enabled.
-   */
-  public function testCreateResourceRestApiNotEnabled() {
-    $entity_type = 'entity_test';
-    // Enables the REST service for a specific entity type.
-    $this->enableService('entity:' . $entity_type, 'POST');
-
-    // Get the necessary user permissions to create the current entity type.
-    $permissions = $this->entityPermissions($entity_type, 'create');
-    // POST method must be allowed for the current entity type.
-    $permissions[] = 'restful post entity:' . $entity_type;
-
-    // Create the user.
-    $account = $this->drupalCreateUser($permissions);
-    // Populate some entity properties before create the entity.
-    $entity_values = $this->entityValues($entity_type);
-    $entity = EntityTest::create($entity_values);
-
-    // Serialize the entity before the POST request.
-    $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-    // Disable all resource types.
-    $this->enableService(FALSE);
-    $this->drupalLogin($account);
-
-    // POST request to create the current entity. GET request for CSRF token
-    // is included into the httpRequest() method.
-    $this->httpRequest('entity/entity_test', 'POST', $serialized, $this->defaultMimeType);
-
-    // The resource is not enabled. So, we receive a 'not found' response.
-    $this->assertResponse(404);
-    $this->assertFalse(EntityTest::loadMultiple(), 'No entity has been created in the database.');
-  }
-
-  /**
-   * Ensure that an entity cannot be created without the restful permission.
-   */
-  public function testCreateWithoutPermission() {
-    $entity_type = 'entity_test';
-    // Enables the REST service for 'entity_test' entity type.
-    $this->enableService('entity:' . $entity_type, 'POST');
-    $permissions = $this->entityPermissions($entity_type, 'create');
-    // Create a user without the 'restful post entity:entity_test permission.
-    $account = $this->drupalCreateUser($permissions);
-    $this->drupalLogin($account);
-    // Populate some entity properties before create the entity.
-    $entity_values = $this->entityValues($entity_type);
-    $entity = EntityTest::create($entity_values);
-
-    // Serialize the entity before the POST request.
-    $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-    // Create the entity over the REST API.
-    $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-    $this->assertResponse(403);
-    $this->assertFalse(EntityTest::loadMultiple(), 'No entity has been created in the database.');
-  }
-
-  /**
-   * Tests several valid and invalid create requests for 'entity_test' entity type.
-   */
-  public function testCreateEntityTest() {
-    $entity_type = 'entity_test';
-    // Enables the REST service for 'entity_test' entity type.
-    $this->enableService('entity:' . $entity_type, 'POST');
-    // Create two accounts that have the required permissions to create resources.
-    // The second one has administrative permissions.
-    $accounts = $this->createAccountPerEntity($entity_type);
-
-    // Verify create requests per user.
-    foreach ($accounts as $key => $account) {
-      $this->drupalLogin($account);
-      // Populate some entity properties before create the entity.
-      $entity_values = $this->entityValues($entity_type);
-      $entity = EntityTest::create($entity_values);
-
-      // Serialize the entity before the POST request.
-      $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-      // Create the entity over the REST API.
-      $this->assertCreateEntityOverRestApi($entity_type, $serialized);
-      // Get the entity ID from the location header and try to read it from the database.
-      $this->assertReadEntityIdFromHeaderAndDb($entity_type, $entity, $entity_values);
-
-      // Try to create an entity with an access protected field.
-      // @see entity_test_entity_field_access()
-      $normalized = $this->serializer->normalize($entity, $this->defaultFormat, ['account' => $account]);
-      $normalized['field_test_text'][0]['value'] = 'no access value';
-      $this->httpRequest('entity/' . $entity_type, 'POST', $this->serializer->serialize($normalized, $this->defaultFormat, ['account' => $account]), $this->defaultMimeType);
-      $this->assertResponse(403);
-      $this->assertFalse(EntityTest::loadMultiple(), 'No entity has been created in the database.');
-
-      // Try to create a field with a text format this user has no access to.
-      $entity->field_test_text->value = $entity_values['field_test_text'][0]['value'];
-      $entity->field_test_text->format = 'full_html';
-
-      $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-      $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-      // The value selected is not a valid choice because the format must be 'plain_txt'.
-      $this->assertResponse(422);
-      $this->assertFalse(EntityTest::loadMultiple(), 'No entity has been created in the database.');
-
-      // Restore the valid test value.
-      $entity->field_test_text->format = 'plain_text';
-      $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-      // Try to send invalid data that cannot be correctly deserialized.
-      $this->assertCreateEntityInvalidData($entity_type);
-
-      // Try to send no data at all, which does not make sense on POST requests.
-      $this->assertCreateEntityNoData($entity_type);
-
-      // Try to send invalid data to trigger the entity validation constraints. Send a UUID that is too long.
-      $this->assertCreateEntityInvalidSerialized($entity, $entity_type);
-
-      // Try to create an entity without proper permissions.
-      $this->assertCreateEntityWithoutProperPermissions($entity_type, $serialized, ['account' => $account]);
-
-    }
-
-  }
-
-  /**
-   * Tests several valid and invalid create requests for 'node' entity type.
-   */
-  public function testCreateNode() {
-    $entity_type = 'node';
-    // Enables the REST service for 'node' entity type.
-    $this->enableService('entity:' . $entity_type, 'POST');
-    // Create two accounts that have the required permissions to create resources.
-    // The second one has administrative permissions.
-    $accounts = $this->createAccountPerEntity($entity_type);
-
-    // Verify create requests per user.
-    foreach ($accounts as $key => $account) {
-      $this->drupalLogin($account);
-      // Populate some entity properties before create the entity.
-      $entity_values = $this->entityValues($entity_type);
-      $entity = Node::create($entity_values);
-
-      // Verify that user cannot create content when trying to write to fields where it is not possible.
-      if (!$account->hasPermission('administer nodes')) {
-        $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-        $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-        $this->assertResponse(403);
-        // Remove fields where non-administrative users cannot write.
-        $entity = $this->removeNodeFieldsForNonAdminUsers($entity);
-      }
-      else {
-        // Changed and revision_timestamp fields can never be added.
-        unset($entity->changed);
-        unset($entity->revision_timestamp);
-      }
-
-      $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-      // Create the entity over the REST API.
-      $this->assertCreateEntityOverRestApi($entity_type, $serialized);
-
-      // Get the new entity ID from the location header and try to read it from the database.
-      $this->assertReadEntityIdFromHeaderAndDb($entity_type, $entity, $entity_values);
-
-      // Try to send invalid data that cannot be correctly deserialized.
-      $this->assertCreateEntityInvalidData($entity_type);
-
-      // Try to send no data at all, which does not make sense on POST requests.
-      $this->assertCreateEntityNoData($entity_type);
-
-      // Try to send invalid data to trigger the entity validation constraints. Send a UUID that is too long.
-      $this->assertCreateEntityInvalidSerialized($entity, $entity_type);
-
-      // Try to create an entity without proper permissions.
-      $this->assertCreateEntityWithoutProperPermissions($entity_type, $serialized);
-
-    }
-
-  }
-
-  /**
-   * Tests several valid and invalid create requests for 'user' entity type.
-   */
-  public function testCreateUser() {
-    $entity_type = 'user';
-    // Enables the REST service for 'user' entity type.
-    $this->enableService('entity:' . $entity_type, 'POST');
-    // Create two accounts that have the required permissions to create resources.
-    // The second one has administrative permissions.
-    $accounts = $this->createAccountPerEntity($entity_type);
-
-    foreach ($accounts as $key => $account) {
-      $this->drupalLogin($account);
-      $entity_values = $this->entityValues($entity_type);
-      $entity = User::create($entity_values);
-
-      // Verify that only administrative users can create users.
-      if (!$account->hasPermission('administer users')) {
-        $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-        $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-        $this->assertResponse(403);
-        continue;
-      }
-
-      // Changed field can never be added.
-      unset($entity->changed);
-
-      $serialized = $this->serializer->serialize($entity, $this->defaultFormat, ['account' => $account]);
-
-      // Create the entity over the REST API.
-      $this->assertCreateEntityOverRestApi($entity_type, $serialized);
-
-      // Get the new entity ID from the location header and try to read it from the database.
-      $this->assertReadEntityIdFromHeaderAndDb($entity_type, $entity, $entity_values);
-
-      // Try to send invalid data that cannot be correctly deserialized.
-      $this->assertCreateEntityInvalidData($entity_type);
-
-      // Try to send no data at all, which does not make sense on POST requests.
-      $this->assertCreateEntityNoData($entity_type);
-
-      // Try to send invalid data to trigger the entity validation constraints.
-      // Send a UUID that is too long.
-      $this->assertCreateEntityInvalidSerialized($entity, $entity_type);
-    }
-
-  }
-
-  /**
-   * Creates user accounts that have the required permissions to create resources via the REST API.
-   * The second one has administrative permissions.
-   *
-   * @param string $entity_type
-   *   Entity type needed to apply user permissions.
-   * @return array
-   *   An array that contains user accounts.
-   */
-  public function createAccountPerEntity($entity_type) {
-    $accounts = array();
-    // Get the necessary user permissions for the current $entity_type creation.
-    $permissions = $this->entityPermissions($entity_type, 'create');
-    // POST method must be allowed for the current entity type.
-    $permissions[] = 'restful post entity:' . $entity_type;
-    // Create user without administrative permissions.
-    $accounts[] = $this->drupalCreateUser($permissions);
-    // Add administrative permissions for nodes and users.
-    $permissions[] = 'administer nodes';
-    $permissions[] = 'administer users';
-    // Create an administrative user.
-    $accounts[] = $this->drupalCreateUser($permissions);
-
-    return $accounts;
-  }
-
-  /**
-   * Creates the entity over the REST API.
-   *
-   * @param string $entity_type
-   *   The type of the entity that should be created.
-   * @param string $serialized
-   *   The body for the POST request.
-   */
-  public function assertCreateEntityOverRestApi($entity_type, $serialized = NULL) {
-    $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-    $this->assertResponse(201);
-  }
-
-  /**
-   * Get the new entity ID from the location header and try to read it from the database.
-   *
-   * @param string $entity_type
-   *   Entity type we need to load the entity from DB.
-   * @param \Drupal\Core\Entity\EntityInterface $entity
-   *   The entity we want to check that was inserted correctly.
-   * @param array $entity_values
-   *   The values of $entity.
-   */
-  public function assertReadEntityIdFromHeaderAndDb($entity_type, EntityInterface $entity, array $entity_values = array()) {
-    // Get the location from the HTTP response header.
-    $location_url = $this->drupalGetHeader('location');
-    $url_parts = explode('/', $location_url);
-    $id = end($url_parts);
-
-    // Get the entity using the ID found.
-    $loaded_entity = \Drupal::entityManager()->getStorage($entity_type)->load($id);
-    $this->assertNotIdentical(FALSE, $loaded_entity, 'The new ' . $entity_type . ' was found in the database.');
-    $this->assertEqual($entity->uuid(), $loaded_entity->uuid(), 'UUID of created entity is correct.');
-
-    // Verify that the field values sent and received from DB are the same.
-    foreach ($entity_values as $property => $value) {
-      $actual_value = $loaded_entity->get($property)->value;
-      $send_value = $entity->get($property)->value;
-      $this->assertEqual($send_value, $actual_value, 'Created property ' . $property . ' expected: ' . $send_value . ', actual: ' . $actual_value);
-    }
-
-    // Delete the entity loaded from DB.
-    $loaded_entity->delete();
-  }
-
-  /**
-   * Try to send invalid data that cannot be correctly deserialized.
-   *
-   * @param string $entity_type
-   *   The type of the entity that should be created.
-   */
-  public function assertCreateEntityInvalidData($entity_type) {
-    $this->httpRequest('entity/' . $entity_type, 'POST', 'kaboom!', $this->defaultMimeType);
-    $this->assertResponse(400);
-  }
-
-  /**
-   * Try to send no data at all, which does not make sense on POST requests.
-   *
-   * @param string $entity_type
-   *   The type of the entity that should be created.
-   */
-  public function assertCreateEntityNoData($entity_type) {
-    $this->httpRequest('entity/' . $entity_type, 'POST', NULL, $this->defaultMimeType);
-    $this->assertResponse(400);
-  }
-
-  /**
-   * Send an invalid UUID to trigger the entity validation.
-   *
-   * @param \Drupal\Core\Entity\EntityInterface $entity
-   *   The entity we want to check that was inserted correctly.
-   * @param string $entity_type
-   *   The type of the entity that should be created.
-   * @param array $context
-   *   Options normalizers/encoders have access to.
-   */
-  public function assertCreateEntityInvalidSerialized(EntityInterface $entity, $entity_type, array $context = array()) {
-    // Add a UUID that is too long.
-    $entity->set('uuid', $this->randomMachineName(129));
-    $invalid_serialized = $this->serializer->serialize($entity, $this->defaultFormat, $context);
-
-    $response = $this->httpRequest('entity/' . $entity_type, 'POST', $invalid_serialized, $this->defaultMimeType);
-
-    // Unprocessable Entity as response.
-    $this->assertResponse(422);
-
-    // Verify that the text of the response is correct.
-    $error = Json::decode($response);
-    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: <em class=\"placeholder\">UUID</em>: may not be longer than 128 characters.\n");
-  }
-
-  /**
-   * Try to create an entity without proper permissions.
-   *
-   * @param string $entity_type
-   *   The type of the entity that should be created.
-   * @param string $serialized
-   *   The body for the POST request.
-   */
-  public function assertCreateEntityWithoutProperPermissions($entity_type, $serialized = NULL) {
-    $this->drupalLogout();
-    $this->httpRequest('entity/' . $entity_type, 'POST', $serialized, $this->defaultMimeType);
-    // Forbidden Error as response.
-    $this->assertResponse(403);
-    $this->assertFalse(\Drupal::entityManager()->getStorage($entity_type)->loadMultiple(), 'No entity has been created in the database.');
-  }
-
-}
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 513d46d..4d8ebd9 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -733,7 +733,7 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas
   $record = array(
     'test_id' => $test_id,
     'test_class' => (string) $attributes->class,
-    'status' => $pass ? 'pass' : 'fail',
+    'status' => 'fail',
     'message' => $message,
     // @todo: Check on the proper values for this.
     'message_group' => 'Other',
diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index 6ef3e94..545b655 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -368,9 +368,7 @@ protected function checkRequirements() {
    */
   protected function assert($status, $message = '', $group = 'Other', array $caller = NULL) {
     // Convert boolean status to string status.
-    if (is_bool($status)) {
-      $status = $status ? 'pass' : 'fail';
-    }
+      $status = 'fail';
 
     // Increment summary result counter.
     $this->results['#' . $status]++;
@@ -404,9 +402,6 @@ protected function assert($status, $message = '', $group = 'Other', array $calle
       return TRUE;
     }
     else {
-      if ($this->dieOnFail && ($status == 'fail' || $status == 'exception')) {
-        exit(1);
-      }
       return FALSE;
     }
   }
diff --git a/core/modules/system/src/Tests/Menu/MenuRouterTest.php b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
index d9e943c..e69de29 100644
--- a/core/modules/system/src/Tests/Menu/MenuRouterTest.php
+++ b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
@@ -1,332 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Menu\MenuRouterTest.
- */
-
-namespace Drupal\system\Tests\Menu;
-
-use Drupal\Core\Url;
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests menu router and default menu link functionality.
- *
- * @group Menu
- */
-class MenuRouterTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('block', 'menu_test', 'test_page_test');
-
-  /**
-   * Name of the administrative theme to use for tests.
-   *
-   * @var string
-   */
-  protected $admin_theme;
-
-  /**
-   * Name of the default theme to use for tests.
-   *
-   * @var string
-   */
-  protected $default_theme;
-
-  protected function setUp() {
-    // Enable dummy module that implements hook_menu.
-    parent::setUp();
-
-    $this->drupalPlaceBlock('system_menu_block:tools');
-  }
-
-  /**
-   * Tests menu integration.
-   */
-  public function testMenuIntegration() {
-    $this->doTestTitleMenuCallback();
-    $this->doTestMenuOptionalPlaceholders();
-    $this->doTestMenuOnRoute();
-    $this->doTestMenuName();
-    $this->doTestMenuLinksDiscoveredAlter();
-    $this->doTestHookMenuIntegration();
-    $this->doTestExoticPath();
-  }
-
-  /**
-   * Test local tasks with route placeholders.
-   */
-  protected function doTestHookMenuIntegration() {
-    // Generate base path with random argument.
-    $machine_name = $this->randomMachineName(8);
-    $base_path = 'foo/' . $machine_name;
-    $this->drupalGet($base_path);
-    // Confirm correct controller activated.
-    $this->assertText('test1');
-    // Confirm local task links are displayed.
-    $this->assertLink('Local task A');
-    $this->assertLink('Local task B');
-    // Confirm correct local task href.
-    $this->assertLinkByHref(Url::fromRoute('menu_test.router_test1', ['bar' => $machine_name])->toString());
-    $this->assertLinkByHref(Url::fromRoute('menu_test.router_test2', ['bar' => $machine_name])->toString());
-  }
-
-  /**
-   * Test title callback set to FALSE.
-   */
-  protected function doTestTitleCallbackFalse() {
-    $this->drupalGet('test-page');
-    $this->assertText('A title with @placeholder', 'Raw text found on the page');
-    $this->assertNoText(t('A title with @placeholder', array('@placeholder' => 'some other text')), 'Text with placeholder substitutions not found.');
-  }
-
-  /**
-   * Tests page title of MENU_CALLBACKs.
-   */
-  protected function doTestTitleMenuCallback() {
-    // Verify that the menu router item title is not visible.
-    $this->drupalGet('');
-    $this->assertNoText(t('Menu Callback Title'));
-    // Verify that the menu router item title is output as page title.
-    $this->drupalGet('menu_callback_title');
-    $this->assertText(t('Menu Callback Title'));
-  }
-
-  /**
-   * Tests menu item descriptions.
-   */
-  protected function doTestDescriptionMenuItems() {
-    // Verify that the menu router item title is output as page title.
-    $this->drupalGet('menu_callback_description');
-    $this->assertText(t('Menu item description text'));
-  }
-
-  /**
-   * Tests for menu_name parameter for default menu links.
-   */
-  protected function doTestMenuName() {
-    $admin_user = $this->drupalCreateUser(array('administer site configuration'));
-    $this->drupalLogin($admin_user);
-    /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
-    $menu_link_manager = \Drupal::service('plugin.manager.menu.link');
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.menu_name_test');
-    $menu_link = reset($menu_links);
-    $this->assertEqual($menu_link->getMenuName(), 'original', 'Menu name is "original".');
-
-    // Change the menu_name parameter in menu_test.module, then force a menu
-    // rebuild.
-    menu_test_menu_name('changed');
-    $menu_link_manager->rebuild();
-
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.menu_name_test');
-    $menu_link = reset($menu_links);
-    $this->assertEqual($menu_link->getMenuName(), 'changed', 'Menu name was successfully changed after rebuild.');
-  }
-
-  /**
-   * Tests menu links added in hook_menu_links_discovered_alter().
-   */
-  protected function doTestMenuLinksDiscoveredAlter() {
-    // Check that machine name does not need to be defined since it is already
-    // set as the key of each menu link.
-    /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
-    $menu_link_manager = \Drupal::service('plugin.manager.menu.link');
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.custom');
-    $menu_link = reset($menu_links);
-    $this->assertEqual($menu_link->getPluginId(), 'menu_test.custom', 'Menu links added at hook_menu_links_discovered_alter() obtain the machine name from the $links key.');
-    // Make sure that rebuilding the menu tree does not produce duplicates of
-    // links added by hook_menu_links_discovered_alter().
-    \Drupal::service('router.builder')->rebuild();
-    $this->drupalGet('menu-test');
-    $this->assertUniqueText('Custom link', 'Menu links added by hook_menu_links_discovered_alter() do not duplicate after a menu rebuild.');
-  }
-
-  /**
-   * Tests for menu hierarchy.
-   */
-  protected function doTestMenuHierarchy() {
-    /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
-    $menu_link_manager = \Drupal::service('plugin.manager.menu.link');
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.hierarchy_parent');
-    $parent_link = reset($menu_links);
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.hierarchy_parent.child');
-    $child_link = reset($menu_links);
-    $menu_links = $menu_link_manager->loadLinksByRoute('menu_test.hierarchy_parent.child2.child');
-    $unattached_child_link = reset($menu_links);
-
-    $this->assertEqual($child_link->getParent(), $parent_link->getPluginId(), 'The parent of a directly attached child is correct.');
-    $this->assertEqual($unattached_child_link->getParent(), $parent_link->getPluginId(), 'The parent of a non-directly attached child is correct.');
-  }
-
-  /**
-   * Test menu links that have optional placeholders.
-   */
-  protected function doTestMenuOptionalPlaceholders() {
-    $this->drupalGet('menu-test/optional');
-    $this->assertResponse(200);
-    $this->assertText('Sometimes there is no placeholder.');
-
-    $this->drupalGet('menu-test/optional/foobar');
-    $this->assertResponse(200);
-    $this->assertText("Sometimes there is a placeholder: 'foobar'.");
-  }
-
-  /**
-   * Tests a menu on a router page.
-   */
-  protected function doTestMenuOnRoute() {
-    \Drupal::service('module_installer')->install(array('router_test'));
-    \Drupal::service('router.builder')->rebuild();
-    $this->resetAll();
-
-    $this->drupalGet('router_test/test2');
-    $this->assertLinkByHref('menu_no_title_callback');
-    $this->assertLinkByHref('menu-title-test/case1');
-    $this->assertLinkByHref('menu-title-test/case2');
-    $this->assertLinkByHref('menu-title-test/case3');
-  }
-
-  /**
-   * Test path containing "exotic" characters.
-   */
-  protected function doTestExoticPath() {
-    $path = "menu-test/ -._~!$'\"()*@[]?&+%#,;=:" . // "Special" ASCII characters.
-      "%23%25%26%2B%2F%3F" . // Characters that look like a percent-escaped string.
-      "éøïвβ中國書۞"; // Characters from various non-ASCII alphabets.
-    $this->drupalGet($path);
-    $this->assertRaw('This is the menuTestCallback content.');
-  }
-
-  /**
-   * Make sure the maintenance mode can be bypassed using an EventSubscriber.
-   *
-   * @see \Drupal\menu_test\EventSubscriber\MaintenanceModeSubscriber::onKernelRequestMaintenance().
-   */
-  public function testMaintenanceModeLoginPaths() {
-    $this->container->get('state')->set('system.maintenance_mode', TRUE);
-
-    $offline_message = t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => $this->config('system.site')->get('name')));
-    $this->drupalGet('test-page');
-    $this->assertText($offline_message);
-    $this->drupalGet('menu_login_callback');
-    $this->assertText('This is TestControllers::testLogin.', 'Maintenance mode can be bypassed using an event subscriber.');
-
-    $this->container->get('state')->set('system.maintenance_mode', FALSE);
-  }
-
-  /**
-   * Test that an authenticated user hitting 'user/login' gets redirected to
-   * 'user' and 'user/register' gets redirected to the user edit page.
-   */
-  public function testAuthUserUserLogin() {
-    $web_user = $this->drupalCreateUser(array());
-    $this->drupalLogin($web_user);
-
-    $this->drupalGet('user/login');
-    // Check that we got to 'user'.
-    $this->assertUrl($this->loggedInUser->url('canonical', ['absolute' => TRUE]));
-
-    // user/register should redirect to user/UID/edit.
-    $this->drupalGet('user/register');
-    $this->assertUrl($this->loggedInUser->url('edit-form', ['absolute' => TRUE]));
-  }
-
-  /**
-   * Tests theme integration.
-   */
-  public function testThemeIntegration() {
-    $this->default_theme = 'bartik';
-    $this->admin_theme = 'seven';
-
-    $theme_handler = $this->container->get('theme_handler');
-    $theme_handler->install(array($this->default_theme, $this->admin_theme));
-    $this->config('system.theme')
-      ->set('default', $this->default_theme)
-      ->set('admin', $this->admin_theme)
-      ->save();
-
-    $this->doTestThemeCallbackMaintenanceMode();
-
-    $this->doTestThemeCallbackFakeTheme();
-
-    $this->doTestThemeCallbackAdministrative();
-
-    $this->doTestThemeCallbackNoThemeRequested();
-
-    $this->doTestThemeCallbackOptionalTheme();
-  }
-
-  /**
-   * Test the theme negotiation when it is set to use an administrative theme.
-   */
-  protected function doTestThemeCallbackAdministrative() {
-    $this->drupalGet('menu-test/theme-callback/use-admin-theme');
-    $this->assertText('Active theme: seven. Actual theme: seven.', 'The administrative theme can be correctly set in a theme negotiation.');
-    $this->assertRaw('seven/css/base/elements.css', "The administrative theme's CSS appears on the page.");
-  }
-
-  /**
-   * Test the theme negotiation when the site is in maintenance mode.
-   */
-  protected function doTestThemeCallbackMaintenanceMode() {
-    $this->container->get('state')->set('system.maintenance_mode', TRUE);
-
-    // For a regular user, the fact that the site is in maintenance mode means
-    // we expect the theme callback system to be bypassed entirely.
-    $this->drupalGet('menu-test/theme-callback/use-admin-theme');
-    $this->assertRaw('bartik/css/base/elements.css', "The maintenance theme's CSS appears on the page.");
-
-    // An administrator, however, should continue to see the requested theme.
-    $admin_user = $this->drupalCreateUser(array('access site in maintenance mode'));
-    $this->drupalLogin($admin_user);
-    $this->drupalGet('menu-test/theme-callback/use-admin-theme');
-    $this->assertText('Active theme: seven. Actual theme: seven.', 'The theme negotiation system is correctly triggered for an administrator when the site is in maintenance mode.');
-    $this->assertRaw('seven/css/base/elements.css', "The administrative theme's CSS appears on the page.");
-
-    $this->container->get('state')->set('system.maintenance_mode', FALSE);
-  }
-
-  /**
-   * Test the theme negotiation when it is set to use an optional theme.
-   */
-  protected function doTestThemeCallbackOptionalTheme() {
-    // Request a theme that is not installed.
-    $this->drupalGet('menu-test/theme-callback/use-stark-theme');
-    $this->assertText('Active theme: bartik. Actual theme: bartik.', 'The theme negotiation system falls back on the default theme when a theme that is not installed is requested.');
-    $this->assertRaw('bartik/css/base/elements.css', "The default theme's CSS appears on the page.");
-
-    // Now install the theme and request it again.
-    $theme_handler = $this->container->get('theme_handler');
-    $theme_handler->install(array('stark'));
-
-    $this->drupalGet('menu-test/theme-callback/use-stark-theme');
-    $this->assertText('Active theme: stark. Actual theme: stark.', 'The theme negotiation system uses an optional theme once it has been installed.');
-    $this->assertRaw('stark/css/layout.css', "The optional theme's CSS appears on the page.");
-
-    $theme_handler->uninstall(array('stark'));
-  }
-
-  /**
-   * Test the theme negotiation when it is set to use a theme that does not exist.
-   */
-  protected function doTestThemeCallbackFakeTheme() {
-    $this->drupalGet('menu-test/theme-callback/use-fake-theme');
-    $this->assertText('Active theme: bartik. Actual theme: bartik.', 'The theme negotiation system falls back on the default theme when a theme that does not exist is requested.');
-    $this->assertRaw('bartik/css/base/elements.css', "The default theme's CSS appears on the page.");
-  }
-
-  /**
-   * Test the theme negotiation when no theme is requested.
-   */
-  protected function doTestThemeCallbackNoThemeRequested() {
-    $this->drupalGet('menu-test/theme-callback/no-theme-requested');
-    $this->assertText('Active theme: bartik. Actual theme: bartik.', 'The theme negotiation system falls back on the default theme when no theme is requested.');
-    $this->assertRaw('bartik/css/base/elements.css', "The default theme's CSS appears on the page.");
-  }
-
-}
diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php
index 85e5e4b..e69de29 100644
--- a/core/modules/system/src/Tests/Routing/RouterTest.php
+++ b/core/modules/system/src/Tests/Routing/RouterTest.php
@@ -1,209 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Routing\RouterTest.
- */
-
-namespace Drupal\system\Tests\Routing;
-
-use Drupal\simpletest\WebTestBase;
-use Symfony\Component\Routing\Exception\RouteNotFoundException;
-
-/**
- * Functional class for the full integrated routing system.
- *
- * @group Routing
- */
-class RouterTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('block', 'router_test');
-
-  /**
-   * Confirms that our default controller logic works properly.
-   */
-  public function testDefaultController() {
-    // Confirm that the router can get to a controller.
-    $this->drupalGet('router_test/test1');
-    $this->assertRaw('test1', 'The correct string was returned because the route was successful.');
-
-    // Check expected headers from FinishResponseSubscriber.
-    $headers = $this->drupalGetHeaders();
-    $this->assertEqual($headers['x-ua-compatible'], 'IE=edge');
-    $this->assertEqual($headers['content-language'], 'en');
-    $this->assertEqual($headers['x-content-type-options'], 'nosniff');
-
-    $this->drupalGet('router_test/test2');
-    $this->assertRaw('test2', 'The correct string was returned because the route was successful.');
-
-    // Confirm that the page wrapping is being added, so we're not getting a
-    // raw body returned.
-    $this->assertRaw('</html>', 'Page markup was found.');
-
-    // In some instances, the subrequest handling may get confused and render
-    // a page inception style.  This test verifies that is not happening.
-    $this->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
-  }
-
-  /**
-   * Confirms that placeholders in paths work correctly.
-   */
-  public function testControllerPlaceholders() {
-    // Test with 0 and a random value.
-    $values = array("0", $this->randomMachineName());
-    foreach ($values as $value) {
-      $this->drupalGet('router_test/test3/' . $value);
-      $this->assertResponse(200);
-      $this->assertRaw($value, 'The correct string was returned because the route was successful.');
-    }
-
-    // Confirm that the page wrapping is being added, so we're not getting a
-    // raw body returned.
-    $this->assertRaw('</html>', 'Page markup was found.');
-
-    // In some instances, the subrequest handling may get confused and render
-    // a page inception style.  This test verifies that is not happening.
-    $this->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
-  }
-
-  /**
-   * Confirms that default placeholders in paths work correctly.
-   */
-  public function testControllerPlaceholdersDefaultValues() {
-    $this->drupalGet('router_test/test4');
-    $this->assertResponse(200);
-    $this->assertRaw('narf', 'The correct string was returned because the route was successful.');
-
-    // Confirm that the page wrapping is being added, so we're not getting a
-    // raw body returned.
-    $this->assertRaw('</html>', 'Page markup was found.');
-
-    // In some instances, the subrequest handling may get confused and render
-    // a page inception style.  This test verifies that is not happening.
-    $this->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
-  }
-
-  /**
-   * Confirms that default placeholders in paths work correctly.
-   */
-  public function testControllerPlaceholdersDefaultValuesProvided() {
-    $this->drupalGet('router_test/test4/barf');
-    $this->assertResponse(200);
-    $this->assertRaw('barf', 'The correct string was returned because the route was successful.');
-
-    // Confirm that the page wrapping is being added, so we're not getting a
-    // raw body returned.
-    $this->assertRaw('</html>', 'Page markup was found.');
-
-    // In some instances, the subrequest handling may get confused and render
-    // a page inception style.  This test verifies that is not happening.
-    $this->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
-  }
-
-  /**
-   * Checks that dynamically defined and altered routes work correctly.
-   *
-   * @see \Drupal\router_test\RouteSubscriber
-   */
-  public function testDynamicRoutes() {
-    // Test the altered route.
-    $this->drupalGet('router_test/test6');
-    $this->assertResponse(200);
-    $this->assertRaw('test5', 'The correct string was returned because the route was successful.');
-  }
-
-  /**
-   * Checks that a request with text/html response gets rendered as a page.
-   */
-  public function testControllerResolutionPage() {
-    $this->drupalGet('/router_test/test10');
-
-    $this->assertRaw('abcde', 'Correct body was found.');
-
-    // Confirm that the page wrapping is being added, so we're not getting a
-    // raw body returned.
-    $this->assertRaw('</html>', 'Page markup was found.');
-
-    // In some instances, the subrequest handling may get confused and render
-    // a page inception style. This test verifies that is not happening.
-    $this->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
-  }
-
-  /**
-   * Checks the generate method on the url generator using the front router.
-   */
-  public function testUrlGeneratorFront() {
-    global $base_path;
-
-    $this->assertEqual($this->container->get('url_generator')->generate('<front>'), $base_path);
-    $this->assertEqual($this->container->get('url_generator')->generateFromPath('<front>'), $base_path);
-  }
-
-  /**
-   * Tests that a page trying to match a path will succeed.
-   */
-  public function testRouterMatching() {
-    $this->drupalGet('router_test/test14/1');
-    $this->assertResponse(200);
-    $this->assertText('User route "entity.user.canonical" was matched.');
-
-    // Try to match a route for a non-existent user.
-    $this->drupalGet('router_test/test14/2');
-    $this->assertResponse(200);
-    $this->assertText('Route not matched.');
-  }
-
-  /**
-   * Tests the user account on the DIC.
-   */
-  public function testUserAccount() {
-    $account = $this->drupalCreateUser();
-    $this->drupalLogin($account);
-
-    $second_account = $this->drupalCreateUser();
-
-    $this->drupalGet('router_test/test12/' . $second_account->id());
-    $this->assertText($account->getUsername() . ':' . $second_account->getUsername());
-    $this->assertEqual($account->id(), $this->loggedInUser->id(), 'Ensure that the user was not changed.');
-
-    $this->drupalGet('router_test/test13/' . $second_account->id());
-    $this->assertText($account->getUsername() . ':' . $second_account->getUsername());
-    $this->assertEqual($account->id(), $this->loggedInUser->id(), 'Ensure that the user was not changed.');
-  }
-
-  /**
-   * Checks that an ajax request gets rendered as an Ajax response, by mime.
-   */
-  public function testControllerResolutionAjax() {
-    // This will fail with a JSON parse error if the request is not routed to
-    // The correct controller.
-    $this->drupalGetAJAX('/router_test/test10');
-
-    $this->assertEqual($this->drupalGetHeader('Content-Type'), 'application/json', 'Correct mime content type was returned');
-
-    $this->assertRaw('abcde', 'Correct body was found.');
-  }
-
-  /**
-   * Tests that routes no longer exist for a module that has been uninstalled.
-   */
-  public function testRouterUninstallInstall() {
-    \Drupal::service('module_installer')->uninstall(array('router_test'));
-    try {
-      \Drupal::service('router.route_provider')->getRouteByName('router_test.1');
-      $this->fail('Route was delete on uninstall.');
-    }
-    catch (RouteNotFoundException $e) {
-      $this->pass('Route was delete on uninstall.');
-    }
-    // Install the module again.
-    \Drupal::service('module_installer')->install(array('router_test'));
-    $route = \Drupal::service('router.route_provider')->getRouteByName('router_test.1');
-    $this->assertNotNull($route, 'Route exists after module installation');
-  }
-}
diff --git a/core/modules/text/src/Tests/TextFieldTest.php b/core/modules/text/src/Tests/TextFieldTest.php
index 104051a..e69de29 100644
--- a/core/modules/text/src/Tests/TextFieldTest.php
+++ b/core/modules/text/src/Tests/TextFieldTest.php
@@ -1,185 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\text\TextFieldTest.
- */
-
-namespace Drupal\text\Tests;
-
-use Drupal\Component\Utility\String;
-use Drupal\Component\Utility\Unicode;
-use Drupal\field\Tests\String\StringFieldTest;
-
-/**
- * Tests the creation of text fields.
- *
- * @group text
- */
-class TextFieldTest extends StringFieldTest {
-
-  /**
-   * A user with relevant administrative privileges.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $adminUser;
-
-  protected function setUp() {
-    parent::setUp();
-
-    $this->adminUser = $this->drupalCreateUser(array('administer filters'));
-  }
-
-  // Test fields.
-
-  /**
-   * Test text field validation.
-   */
-  function testTextFieldValidation() {
-    // Create a field with settings to validate.
-    $max_length = 3;
-    $field_name = Unicode::strtolower($this->randomMachineName());
-    $field_storage = entity_create('field_storage_config', array(
-      'field_name' => $field_name,
-      'entity_type' => 'entity_test',
-      'type' => 'text',
-      'settings' => array(
-        'max_length' => $max_length,
-      )
-    ));
-    $field_storage->save();
-    entity_create('field_config', array(
-      'field_storage' => $field_storage,
-      'bundle' => 'entity_test',
-    ))->save();
-
-    // Test validation with valid and invalid values.
-    $entity = entity_create('entity_test');
-    for ($i = 0; $i <= $max_length + 2; $i++) {
-      $entity->{$field_name}->value = str_repeat('x', $i);
-      $violations = $entity->{$field_name}->validate();
-      if ($i <= $max_length) {
-        $this->assertEqual(count($violations), 0, "Length $i does not cause validation error when max_length is $max_length");
-      }
-      else {
-        $this->assertEqual(count($violations), 1, "Length $i causes validation error when max_length is $max_length");
-      }
-    }
-  }
-
-  /**
-   * Test widgets.
-   */
-  function testTextfieldWidgets() {
-    $this->_testTextfieldWidgets('text', 'text_textfield');
-    $this->_testTextfieldWidgets('text_long', 'text_textarea');
-  }
-
-  /**
-   * Test widgets + 'formatted_text' setting.
-   */
-  function testTextfieldWidgetsFormatted() {
-    $this->_testTextfieldWidgetsFormatted('text', 'text_textfield');
-    $this->_testTextfieldWidgetsFormatted('text_long', 'text_textarea');
-  }
-
-  /**
-   * Helper function for testTextfieldWidgetsFormatted().
-   */
-  function _testTextfieldWidgetsFormatted($field_type, $widget_type) {
-    // Create a field.
-    $field_name = Unicode::strtolower($this->randomMachineName());
-    $field_storage = entity_create('field_storage_config', array(
-      'field_name' => $field_name,
-      'entity_type' => 'entity_test',
-      'type' => $field_type
-    ));
-    $field_storage->save();
-    entity_create('field_config', array(
-      'field_storage' => $field_storage,
-      'bundle' => 'entity_test',
-      'label' => $this->randomMachineName() . '_label',
-    ))->save();
-    entity_get_form_display('entity_test', 'entity_test', 'default')
-      ->setComponent($field_name, array(
-        'type' => $widget_type,
-      ))
-      ->save();
-    entity_get_display('entity_test', 'entity_test', 'full')
-      ->setComponent($field_name)
-      ->save();
-
-    // Disable all text formats besides the plain text fallback format.
-    $this->drupalLogin($this->adminUser);
-    foreach (filter_formats() as $format) {
-      if (!$format->isFallbackFormat()) {
-        $this->drupalPostForm('admin/config/content/formats/manage/' . $format->id() . '/disable', array(), t('Disable'));
-      }
-    }
-    $this->drupalLogin($this->webUser);
-
-    // Display the creation form. Since the user only has access to one format,
-    // no format selector will be displayed.
-    $this->drupalGet('entity_test/add');
-    $this->assertFieldByName("{$field_name}[0][value]", '', 'Widget is displayed');
-    $this->assertNoFieldByName("{$field_name}[0][format]", '', 'Format selector is not displayed');
-
-    // Submit with data that should be filtered.
-    $value = '<em>' . $this->randomMachineName() . '</em>';
-    $edit = array(
-      "{$field_name}[0][value]" => $value,
-    );
-    $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
-    $id = $match[1];
-    $this->assertText(t('entity_test @id has been created.', array('@id' => $id)), 'Entity was created');
-
-    // Display the entity.
-    $entity = entity_load('entity_test', $id);
-    $display = entity_get_display($entity->getEntityTypeId(), $entity->bundle(), 'full');
-    $content = $display->build($entity);
-    $this->drupalSetContent(drupal_render($content));
-    $this->assertNoRaw($value, 'HTML tags are not displayed.');
-    $this->assertEscaped($value, 'Escaped HTML is displayed correctly.');
-
-    // Create a new text format that does not escape HTML, and grant the user
-    // access to it.
-    $this->drupalLogin($this->adminUser);
-    $edit = array(
-      'format' => Unicode::strtolower($this->randomMachineName()),
-      'name' => $this->randomMachineName(),
-    );
-    $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration'));
-    filter_formats_reset();
-    $format = entity_load('filter_format', $edit['format']);
-    $format_id = $format->id();
-    $permission = $format->getPermissionName();
-    $roles = $this->webUser->getRoles();
-    $rid = $roles[0];
-    user_role_grant_permissions($rid, array($permission));
-    $this->drupalLogin($this->webUser);
-
-    // Display edition form.
-    // We should now have a 'text format' selector.
-    $this->drupalGet('entity_test/manage/' . $id);
-    $this->assertFieldByName("{$field_name}[0][value]", NULL, 'Widget is displayed');
-    $this->assertFieldByName("{$field_name}[0][format]", NULL, 'Format selector is displayed');
-
-    // Edit and change the text format to the new one that was created.
-    $edit = array(
-      "{$field_name}[0][format]" => $format_id,
-    );
-    $this->drupalPostForm(NULL, $edit, t('Save'));
-    $this->assertText(t('entity_test @id has been updated.', array('@id' => $id)), 'Entity was updated');
-
-    // Display the entity.
-    $this->container->get('entity.manager')->getStorage('entity_test')->resetCache(array($id));
-    $entity = entity_load('entity_test', $id);
-    $display = entity_get_display($entity->getEntityTypeId(), $entity->bundle(), 'full');
-    $content = $display->build($entity);
-    $this->drupalSetContent(drupal_render($content));
-    $this->assertRaw($value, 'Value is displayed unfiltered');
-  }
-
-}
diff --git a/core/modules/user/src/Tests/UserPermissionsTest.php b/core/modules/user/src/Tests/UserPermissionsTest.php
index 7a8bb2e..e69de29 100644
--- a/core/modules/user/src/Tests/UserPermissionsTest.php
+++ b/core/modules/user/src/Tests/UserPermissionsTest.php
@@ -1,139 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\user\Tests\UserPermissionsTest.
- */
-
-namespace Drupal\user\Tests;
-
-use Drupal\simpletest\WebTestBase;
-use Drupal\user\RoleStorage;
-
-/**
- * Verify that role permissions can be added and removed via the permissions
- * page.
- *
- * @group user
- */
-class UserPermissionsTest extends WebTestBase {
-
-  /**
-   * User with admin privileges.
-   *
-   * @var \Drupal\user\UserInterface
-   */
-  protected $adminUser;
-
-  /**
-   * User's role ID.
-   *
-   * @var string
-   */
-  protected $rid;
-
-  protected function setUp() {
-    parent::setUp();
-
-    $this->adminUser = $this->drupalCreateUser(array('administer permissions', 'access user profiles', 'administer site configuration', 'administer modules', 'administer account settings'));
-
-    // Find the new role ID.
-    $all_rids = $this->adminUser->getRoles();
-    unset($all_rids[array_search(DRUPAL_AUTHENTICATED_RID, $all_rids)]);
-    $this->rid = reset($all_rids);
-  }
-
-  /**
-   * Test changing user permissions through the permissions page.
-   */
-  function testUserPermissionChanges() {
-    $permissions_hash_generator = $this->container->get('user.permissions_hash');
-
-    $this->drupalLogin($this->adminUser);
-    $rid = $this->rid;
-    $account = $this->adminUser;
-    $previous_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
-
-    // Add a permission.
-    $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.');
-    $edit = array();
-    $edit[$rid . '[administer users]'] = TRUE;
-    $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.');
-    $storage = $this->container->get('entity.manager')->getStorage('user_role');
-    $storage->resetCache();
-    $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.');
-    $current_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
-    $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');
-    $previous_permissions_hash = $current_permissions_hash;
-
-    // Remove a permission.
-    $this->assertTrue($account->hasPermission('access user profiles'), 'User has "access user profiles" permission.');
-    $edit = array();
-    $edit[$rid . '[access user profiles]'] = FALSE;
-    $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.');
-    $storage->resetCache();
-    $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.');
-    $current_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertIdentical($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
-    $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');
-  }
-
-  /**
-   * Test assigning of permissions for the administrator role.
-   */
-  function testAdministratorRole() {
-    $this->drupalLogin($this->adminUser);
-    $this->drupalGet('admin/config/people/accounts');
-
-    // Verify that the administration role is none by default.
-    $this->assertOptionSelected('edit-user-admin-role', '', 'Administration role defaults to none.');
-
-    // Set the user's role to be the administrator role.
-    $edit = array();
-    $edit['user_admin_role'] = $this->rid;
-    $this->drupalPostForm('admin/config/people/accounts', $edit, t('Save configuration'));
-
-    // Enable aggregator module and ensure the 'administer news feeds'
-    // permission is assigned by default.
-    \Drupal::service('module_installer')->install(array('aggregator'));
-
-    $this->assertTrue($this->adminUser->hasPermission('administer news feeds'), 'The permission was automatically assigned to the administrator role');
-  }
-
-  /**
-   * Verify proper permission changes by user_role_change_permissions().
-   */
-  function testUserRoleChangePermissions() {
-    $permissions_hash_generator = $this->container->get('user.permissions_hash');
-
-    $rid = $this->rid;
-    $account = $this->adminUser;
-    $previous_permissions_hash = $permissions_hash_generator->generate($account);
-
-    // Verify current permissions.
-    $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.');
-    $this->assertTrue($account->hasPermission('access user profiles'), 'User has "access user profiles" permission.');
-    $this->assertTrue($account->hasPermission('administer site configuration'), 'User has "administer site configuration" permission.');
-
-    // Change permissions.
-    $permissions = array(
-      'administer users' => 1,
-      'access user profiles' => 0,
-    );
-    user_role_change_permissions($rid, $permissions);
-
-    // Verify proper permission changes.
-    $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.');
-    $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.');
-    $this->assertTrue($account->hasPermission('administer site configuration'), 'User still has "administer site configuration" permission.');
-
-    // Verify the permissions hash has changed.
-    $current_permissions_hash = $permissions_hash_generator->generate($account);
-    $this->assertNotEqual($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');
-  }
-
-}
