From dfa0168120b9c4e89915908daae78a8309d4987b Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Fri, 22 Mar 2024 11:48:52 +1000
Subject: [PATCH] Issue #3432863 by obsidian_, mstrelan, DanielVeza: Remove
 deprecated code from core/tests/fixtures

---
 ...rowserMissingDependentModuleMethodTest.php | 42 ------------------
 .../BrowserMissingDependentModuleTest.php     | 44 -------------------
 ...KernelMissingDependentModuleMethodTest.php | 40 -----------------
 .../KernelMissingDependentModuleTest.php      | 42 ------------------
 .../custom/fake/Connection.php                |  8 ----
 5 files changed, 176 deletions(-)
 delete mode 100644 core/tests/fixtures/BrowserMissingDependentModuleMethodTest.php
 delete mode 100644 core/tests/fixtures/BrowserMissingDependentModuleTest.php
 delete mode 100644 core/tests/fixtures/KernelMissingDependentModuleMethodTest.php
 delete mode 100644 core/tests/fixtures/KernelMissingDependentModuleTest.php

diff --git a/core/tests/fixtures/BrowserMissingDependentModuleMethodTest.php b/core/tests/fixtures/BrowserMissingDependentModuleMethodTest.php
deleted file mode 100644
index 09a637d74c33..000000000000
--- a/core/tests/fixtures/BrowserMissingDependentModuleMethodTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-namespace Drupal\FunctionalTests;
-
-use Drupal\Tests\BrowserTestBase;
-
-@trigger_error('\\Drupal\\FunctionalTests\\BrowserMissingDependentModuleMethodTest is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3418480', E_USER_DEPRECATED);
-
-/**
- * A fixture test class with requires annotation.
- *
- * This is a fixture class for
- * \Drupal\FunctionalTests\BrowserTestBaseTest::testMethodRequiresModule().
- *
- * This test class should not be discovered by run-tests.sh, phpstan or phpunit.
- *
- * @group fixture
- *
- * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
- *   replacement.
- *
- * @see https://www.drupal.org/node/3418480
- */
-class BrowserMissingDependentModuleMethodTest extends BrowserTestBase {
-
-  /**
-   * This method should be skipped since it requires a module that is not found.
-   *
-   * @requires module module_does_not_exist
-   */
-  public function testRequiresModule() {
-    $this->fail('Running test with missing required module.');
-  }
-
-  /**
-   * Public access for checkRequirements() to avoid reflection.
-   */
-  public function publicCheckRequirements() {
-    return parent::checkRequirements();
-  }
-
-}
diff --git a/core/tests/fixtures/BrowserMissingDependentModuleTest.php b/core/tests/fixtures/BrowserMissingDependentModuleTest.php
deleted file mode 100644
index 40d8b370f643..000000000000
--- a/core/tests/fixtures/BrowserMissingDependentModuleTest.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-namespace Drupal\FunctionalTests;
-
-use Drupal\Tests\BrowserTestBase;
-
-@trigger_error('\\Drupal\\FunctionalTests\\BrowserMissingDependentModuleTest is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3418480', E_USER_DEPRECATED);
-
-/**
- * A fixture test class with requires annotation.
- *
- * This is a fixture class for
- * \Drupal\FunctionalTests\BrowserTestBaseTest::testRequiresModule().
- *
- * This test class should not be discovered by run-tests.sh, phpstan or phpunit.
- *
- * @requires module module_does_not_exist
- * @group fixture
- *
- * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
- *   replacement.
- *
- * @see https://www.drupal.org/node/3418480
- */
-class BrowserMissingDependentModuleTest extends BrowserTestBase {
-
-  /**
-   * Placeholder test method.
-   *
-   * Depending on configuration, PHPUnit might fail a test if it has no test
-   * methods, so we must provide one. This method should never be executed.
-   */
-  public function testRequiresModule() {
-    $this->fail('Running test with missing required module.');
-  }
-
-  /**
-   * Public access for checkRequirements() to avoid reflection.
-   */
-  public function publicCheckRequirements() {
-    return parent::checkRequirements();
-  }
-
-}
diff --git a/core/tests/fixtures/KernelMissingDependentModuleMethodTest.php b/core/tests/fixtures/KernelMissingDependentModuleMethodTest.php
deleted file mode 100644
index 55d4a4e47234..000000000000
--- a/core/tests/fixtures/KernelMissingDependentModuleMethodTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace Drupal\KernelTests;
-
-@trigger_error('\\Drupal\\FunctionalTests\\KernelMissingDependentModuleMethodTest is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3418480', E_USER_DEPRECATED);
-
-/**
- * A fixture test class with requires annotation.
- *
- * This is a fixture class for
- * \Drupal\KernelTests\KernelTestBaseTest::testRequiresModule().
- *
- * This test class should not be discovered by run-tests.sh, phpstan or phpunit.
- *
- * @group fixture
- *
- * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
- *   replacement.
- *
- * @see https://www.drupal.org/node/3418480
- */
-class KernelMissingDependentModuleMethodTest extends KernelTestBase {
-
-  /**
-   * This method should be skipped since it requires a module that is not found.
-   *
-   * @requires module module_does_not_exist
-   */
-  public function testRequiresModule() {
-    $this->fail('Running test with missing required module.');
-  }
-
-  /**
-   * Public access for checkRequirements() to avoid reflection.
-   */
-  public function publicCheckRequirements() {
-    return parent::checkRequirements();
-  }
-
-}
diff --git a/core/tests/fixtures/KernelMissingDependentModuleTest.php b/core/tests/fixtures/KernelMissingDependentModuleTest.php
deleted file mode 100644
index 7abc5e733f78..000000000000
--- a/core/tests/fixtures/KernelMissingDependentModuleTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-namespace Drupal\KernelTests;
-
-@trigger_error('\\Drupal\\FunctionalTests\\KernelMissingDependentModuleTest is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3418480', E_USER_DEPRECATED);
-
-/**
- * A fixture test class with requires annotation.
- *
- * This is a fixture class for
- * \Drupal\KernelTests\KernelTestBaseTest::testRequiresModule().
- *
- * This test class should not be discovered by run-tests.sh, phpstan or phpunit.
- *
- * @requires module module_does_not_exist
- * @group fixture
- *
- * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
- *   replacement.
- *
- * @see https://www.drupal.org/node/3418480
- */
-class KernelMissingDependentModuleTest extends KernelTestBase {
-
-  /**
-   * Placeholder test method.
-   *
-   * Depending on configuration, PHPUnit might fail a test if it has no test
-   * methods, so we must provide one. This method should never be executed.
-   */
-  public function testRequiresModule() {
-    $this->fail('Running test with missing required module.');
-  }
-
-  /**
-   * Public access for checkRequirements() to avoid reflection.
-   */
-  public function publicCheckRequirements() {
-    return parent::checkRequirements();
-  }
-
-}
diff --git a/core/tests/fixtures/database_drivers/custom/fake/Connection.php b/core/tests/fixtures/database_drivers/custom/fake/Connection.php
index 4f3eb088b633..1168f2aaf683 100644
--- a/core/tests/fixtures/database_drivers/custom/fake/Connection.php
+++ b/core/tests/fixtures/database_drivers/custom/fake/Connection.php
@@ -76,14 +76,6 @@ public function mapConditionOperator($operator) {
     return NULL;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function nextId($existing_id = 0) {
-    @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3349345', E_USER_DEPRECATED);
-    return 0;
-  }
-
   /**
    * {@inheritdoc}
    */
-- 
GitLab