Unverified Commit a84d05f2 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2847678 by mpdonadio, Lendude, Berdir, Mile23, klausi, dawehner,...

Issue #2847678 by mpdonadio, Lendude, Berdir, Mile23, klausi, dawehner, jibran, claudiu.cristea, alexpott: Deprecate WebTestBase and its required classes in favour of BrowserTestBase
parent ba509afb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@

use Drupal\KernelTests\AssertContentTrait as CoreAssertContentTrait;

@trigger_error('\Drupal\simpletest\AssertContentTrait is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\KernelTests\AssertContentTrait.', E_USER_DEPRECATED);

/**
 * Provides test methods to assert content.
 *
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@
 * Base class for Drupal tests.
 *
 * Do not extend this class directly; use \Drupal\simpletest\WebTestBase.
 *
 * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
 *   use one of the phpunit base test classes like
 *   Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 */
abstract class TestBase {

+5 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
use Drupal\Core\Test\AssertMailTrait;
use Drupal\Core\Test\FunctionalTestSetupTrait;
use Drupal\Core\Url;
use Drupal\KernelTests\AssertContentTrait as CoreAssertContentTrait;
use Drupal\system\Tests\Cache\AssertPageCacheContextsAndTagsTrait;
use Drupal\Tests\EntityViewTrait;
use Drupal\Tests\block\Traits\BlockCreationTrait as BaseBlockCreationTrait;
@@ -31,11 +32,14 @@
 * Test case for typical Drupal tests.
 *
 * @ingroup testing
 *
 * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
 *   use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 */
abstract class WebTestBase extends TestBase {

  use FunctionalTestSetupTrait;
  use AssertContentTrait;
  use CoreAssertContentTrait;
  use TestFileCreationTrait {
    getTestFiles as drupalGetTestFiles;
    compareFiles as drupalCompareFiles;