Commit 3e47f835 authored by catch's avatar catch
Browse files

Issue #3177120 by anmolgoyal74, Pooja Ganjage, paulocs, markdorison,...

Issue #3177120 by anmolgoyal74, Pooja Ganjage, paulocs, markdorison, walangitan, longwave: Remove references to WebTestBase
parent a9cee683
......@@ -20,8 +20,7 @@
* is invalid.
*
* @see \Drupal\KernelTests\KernelTestBase::register()
* @see \Drupal\simpletest\WebTestBase::setUp()
* @see \Drupal\simpletest\KernelTestBase::containerBuild()
* @see \Drupal\Core\Test\FunctionalTestSetupTrait::prepareSettings()
*/
class ConfigSchemaChecker implements EventSubscriberInterface {
use SchemaCheckTrait;
......
......@@ -174,7 +174,7 @@ public function scan($type, $include_tests = NULL) {
// test site environment, because the site directories are not the same.
// Therefore, add the site directory of the parent site to the search paths,
// so that contained extensions are still discovered.
// @see \Drupal\simpletest\WebTestBase::setUp()
// @see \Drupal\Core\Test\FunctionalTestSetupTrait::prepareSettings().
if ($parent_site = Settings::get('test_parent_site')) {
$searchdirs[static::ORIGIN_PARENT_SITE] = $parent_site;
}
......
......@@ -174,7 +174,7 @@ public function register() {
*/
public function unregister() {
// Normally, there are definitely wrappers set for the ALL filter. However,
// in some cases involving many container rebuilds (e.g. WebTestBase),
// in some cases involving many container rebuilds (e.g. BrowserTestBase),
// $this->wrappers may be empty although wrappers are still registered
// globally. Thus an isset() check is needed before iterating.
if (isset($this->wrappers[StreamWrapperInterface::ALL])) {
......
......@@ -211,7 +211,6 @@ protected function rebuildContainer() {
*
* @see \Drupal\Core\Test\FunctionalTestSetupTrait::rebuildAll()
* @see \Drupal\Tests\BrowserTestBase::installDrupal()
* @see \Drupal\simpletest\WebTestBase::setUp()
*/
protected function resetAll() {
// Clear all database and static caches and rebuild data structures.
......
......@@ -37,8 +37,6 @@ public function __invoke() {
foreach ($headers as $header_name => $header_values) {
if (preg_match('/^X-Drupal-Assertion-[0-9]+$/', $header_name, $matches)) {
foreach ($header_values as $header_value) {
// Call \Drupal\simpletest\WebTestBase::error() with the parameters from
// the header.
$parameters = unserialize(urldecode($header_value));
if (count($parameters) === 3) {
if ($parameters[1] === 'User deprecated function') {
......
......@@ -123,15 +123,14 @@ public static function getDatabaseConnection() {
* order to access and read the error log.
*
* The generated database table prefix is used for the Drupal installation
* being performed for the test. It is also used as user agent HTTP header
* value by the cURL-based browser of WebTestBase, which is sent to the Drupal
* installation of the test. During early Drupal bootstrap, the user agent
* HTTP header is parsed, and if it matches, all database queries use the
* database table prefix that has been generated here.
* being performed for the test. It is also used as user agent HTTP header it
* is also used in the user agent HTTP header value by BrowserTestBase, which
* is sent to the Drupal installation of the test. During early Drupal all
* bootstrap, the user agent HTTP header is parsed, and if it matches,
* database queries use the database table prefix that has been generated
* here.
*
* @see \Drupal\Tests\BrowserTestBase::prepareEnvironment()
* @see \Drupal\simpletest\WebTestBase::curlInitialize()
* @see \Drupal\simpletest\TestBase::prepareEnvironment()
* @see drupal_valid_test_ua()
*/
protected function prepareDatabasePrefix() {
......
......@@ -50,8 +50,8 @@ protected function setUp(): void {
parent::setUp();
// Ignore the <meta> refresh that big_pipe.module sets. It causes a redirect
// to a page that sets another cookie, which causes WebTestBase to lose the
// session cookie. To avoid this problem, tests should first call
// to a page that sets another cookie, which causes BrowserTestBase to lose
// the session cookie. To avoid this problem, tests should first call
// drupalGet() and then call checkForMetaRefresh() manually, and then reset
// $this->maximumMetaRefreshCount and $this->metaRefreshCount.
// @see doMetaRefresh()
......
......@@ -422,7 +422,7 @@ public function testTwoPagers() {
* @return string|false
* Page contents on success, or FALSE on failure.
*
* @see WebTestBase::clickLink()
* @see \Drupal\Tests\UiHelperTrait::clickLink()
*/
protected function clickLinkWithXPath($xpath, $arguments = [], $index = 0) {
$url_before = $this->getUrl();
......
......@@ -32,7 +32,7 @@ public static function create(ContainerInterface $container) {
}
/**
* Tests the WebTestBase tests can use strict schema checking.
* Tests the BrowserTestBase tests can use strict schema checking.
*/
public function test() {
try {
......
......@@ -6,7 +6,7 @@
use Drupal\Tests\BrowserTestBase;
/**
* Tests the functionality of ConfigSchemaChecker in WebTestBase tests.
* Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.
*
* @group config
*/
......
......@@ -91,7 +91,7 @@ protected function setUp(): void {
public function testBooleanFormatterSettings() {
// List the options we expect to see on the settings form. Omit the one
// with the Unicode check/x characters, which does not appear to work
// well in WebTestBase.
// well in BrowserTestBase.
$options = [
'Yes / No',
'True / False',
......
......@@ -90,7 +90,7 @@ protected function setUp(): void {
public function testBooleanFormatterSettings() {
// List the options we expect to see on the settings form. Omit the one
// with the Unicode check/x characters, which does not appear to work
// well in WebTestBase.
// well in BrowserTestBase.
$options = [
'Yes / No',
'True / False',
......
......@@ -28,7 +28,7 @@ class ResponsiveImageAdminUITest extends BrowserTestBase {
protected $defaultTheme = 'stark';
/**
* Drupal\simpletest\WebTestBase\setUp().
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
......
......@@ -47,7 +47,7 @@ class ResponsiveImageFieldDisplayTest extends ImageFieldTestBase {
];
/**
* Drupal\simpletest\WebTestBase\setUp().
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
......
......@@ -9,7 +9,7 @@
/**
* Tests request logging for cached and uncached pages.
*
* We subclass WebTestBase rather than StatisticsTestBase, because we
* We subclass BrowserTestBase rather than StatisticsTestBase, because we
* want to test requests from an anonymous user.
*
* @group statistics
......
......@@ -27,9 +27,9 @@ public function getFormId() {
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
// In order to use WebTestBase::drupalPostAjaxForm() to POST from a link, we need
// to have a dummy field we can set in WebTestBase::drupalPostForm() else it won't
// submit anything.
// In order to use WebTestBase::drupalPostAjaxForm() to POST from a link,
// we need to have a dummy field we can set in
// WebTestBase::drupalPostForm() else it won't submit anything.
$form['textfield'] = [
'#type' => 'hidden',
];
......
......@@ -50,10 +50,10 @@ public function testEntityOperationAlter() {
* {@inheritdoc}
*/
protected function createRole(array $permissions, $rid = NULL, $name = NULL, $weight = NULL) {
// WebTestBase::drupalCreateRole() by default uses random strings which may
// include HTML entities for the entity label. Since in this test the entity
// label is used to generate a link, and AssertContentTrait::assertLink() is
// not designed to deal with links potentially containing HTML entities this
// The parent method uses random strings by default, which may include HTML
// entities for the entity label. Since in this test the entity label is
// used to generate a link, and AssertContentTrait::assertLink() is not
// designed to deal with links potentially containing HTML entities this
// causes random failures. Use a random HTML safe string instead.
$name = $name ?: $this->randomMachineName();
return parent::createRole($permissions, $rid, $name, $weight);
......
......@@ -18,13 +18,13 @@ trait AssertBreadcrumbTrait {
*
* @param \Drupal\Core\Url|string $goto
* (optional) A path or URL to pass to
* Drupal\simpletest\WebTestBase::drupalGet().
* \Drupal\Tests\UiHelperTrait::drupalGet().
* @param array $trail
* An associative array whose keys are expected breadcrumb link paths and
* whose values are expected breadcrumb link texts (not sanitized).
* @param string $page_title
* (optional) A page title to additionally assert via
* Drupal\simpletest\WebTestBase::assertTitle(). Without site name suffix.
* \Drupal\Tests\WebAssert::titleEquals(). Without site name suffix.
* @param array $tree
* (optional) An associative array whose keys are link paths and whose
* values are link titles (not sanitized) of an expected active trail in a
......
......@@ -143,7 +143,6 @@ public function testDrupalRenderFormElements() {
protected function assertRenderedElement(array $element, $xpath, array $xpath_args = []) {
$this->render($element);
// @see \Drupal\simpletest\WebTestBase::xpath()
$xpath = $this->buildXPathQuery($xpath, $xpath_args);
$element += ['#value' => NULL];
$this->assertFieldByXPath($xpath, $element['#value'], new FormattableMarkup('#type @type was properly rendered.', [
......
......@@ -18,7 +18,6 @@
* include the same methods.
*
* @see \Drupal\Tests\views\Kernel\ViewsKernelTestBase
* @see \Drupal\simpletest\WebTestBase
*/
abstract class ViewTestBase extends BrowserTestBase {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment