diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php index 5c98cbd5880fff048ef429155ff6ccd4cc65678b..0931f20e02799680977bb2456517c987f3390a0d 100644 --- a/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php +++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php @@ -21,14 +21,12 @@ public function testPhpUnitListTests() { // The goal here is to successfully generate the list, without any // duplicate namespace errors or so forth. This keeps us from committing // tests which don't break under run-tests.sh, but do break under the - // PHPUnit CLI test runner tool. + // phpunit test runner tool. $process = Process::fromShellCommandline('vendor/bin/phpunit --configuration core --verbose --list-tests'); $process->setWorkingDirectory($this->root) ->setTimeout(300) ->setIdleTimeout(300); - // We disable deprecations since we do not care about them in this test, - // and deprecated classes will trigger an error when loading. - $process->run(NULL, ['SYMFONY_DEPRECATIONS_HELPER' => 'disabled']); + $process->run(); $this->assertEquals(0, $process->getExitCode(), 'COMMAND: ' . $process->getCommandLine() . "\n" . 'OUTPUT: ' . $process->getOutput() . "\n" . diff --git a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php index 1f53f981775e562bed4f5a4073bd641a569403b8..2589132ca2f8eef89fb6e558b50fbb95ad0aae2f 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php @@ -7,7 +7,6 @@ use Drupal\Tests\TestSuites\TestSuiteBase; use org\bovigo\vfs\vfsStream; use PHPUnit\Framework\TestCase; -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; // The test suite class is not part of the autoloader, we need to include it // manually. @@ -20,8 +19,6 @@ */ class TestSuiteBaseTest extends TestCase { - use ExpectDeprecationTrait; - /** * Helper method to set up the file system. * @@ -84,16 +81,11 @@ public function provideCoreTests() { /** * Tests for special case behavior of unit test suite namespaces in core. * - * @group legacy - * * @covers ::addTestsBySuiteNamespace * * @dataProvider provideCoreTests */ public function testAddTestsBySuiteNamespaceCore($filesystem, $suite_namespace, $expected_tests) { - - $this->expectDeprecation('Drupal\\Tests\\Core\\Test\\StubTestSuiteBase is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829'); - // Set up the file system. $vfs = vfsStream::setup('root'); vfsStream::create($filesystem, $vfs); @@ -126,8 +118,6 @@ public function testLocalTimeZone() { * * We use this class to alter the behavior of TestSuiteBase so it can be * testable. - * - * @phpstan-ignore-next-line */ class StubTestSuiteBase extends TestSuiteBase { @@ -138,12 +128,6 @@ class StubTestSuiteBase extends TestSuiteBase { */ public $testFiles = []; - public function __construct(string $name) { - @trigger_error(__CLASS__ . ' is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - // @phpstan-ignore-next-line - parent::__construct($name); - } - /** * {@inheritdoc} */ diff --git a/core/tests/TestSuites/BuildTestSuite.php b/core/tests/TestSuites/BuildTestSuite.php index c743820021bfc0b485b895b3457b8cfbc7f9d904..39c4660c7aae42832af5614363d5499287259f65 100644 --- a/core/tests/TestSuites/BuildTestSuite.php +++ b/core/tests/TestSuites/BuildTestSuite.php @@ -4,19 +4,10 @@ namespace Drupal\Tests\TestSuites; -@trigger_error('\Drupal\Tests\TestSuites\BuildTestSuite is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - require_once __DIR__ . '/TestSuiteBase.php'; /** * Discovers tests for the build test suite. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 - * - * @phpstan-ignore-next-line */ class BuildTestSuite extends TestSuiteBase { diff --git a/core/tests/TestSuites/FunctionalJavascriptTestSuite.php b/core/tests/TestSuites/FunctionalJavascriptTestSuite.php index 1c4c4315e3e3e36ddd5dac3eedc77c51a0b81de6..d026e725e82accd649bb0a7392c0e9fca71078ea 100644 --- a/core/tests/TestSuites/FunctionalJavascriptTestSuite.php +++ b/core/tests/TestSuites/FunctionalJavascriptTestSuite.php @@ -4,19 +4,10 @@ namespace Drupal\Tests\TestSuites; -@trigger_error('\Drupal\Tests\TestSuites\FunctionalJavascriptTestSuite is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - require_once __DIR__ . '/TestSuiteBase.php'; /** * Discovers tests for the functional-javascript test suite. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 - * - * @phpstan-ignore-next-line */ class FunctionalJavascriptTestSuite extends TestSuiteBase { diff --git a/core/tests/TestSuites/FunctionalTestSuite.php b/core/tests/TestSuites/FunctionalTestSuite.php index 1cf5d9945aa0be983af874e40e1b7cbd4d0dabd2..1ddbde2b32e4dd61fb9aae68d59e665f4e026c02 100644 --- a/core/tests/TestSuites/FunctionalTestSuite.php +++ b/core/tests/TestSuites/FunctionalTestSuite.php @@ -4,19 +4,10 @@ namespace Drupal\Tests\TestSuites; -@trigger_error('\Drupal\Tests\TestSuites\FunctionalTestSuite is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - require_once __DIR__ . '/TestSuiteBase.php'; /** * Discovers tests for the functional test suite. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 - * - * @phpstan-ignore-next-line */ class FunctionalTestSuite extends TestSuiteBase { diff --git a/core/tests/TestSuites/KernelTestSuite.php b/core/tests/TestSuites/KernelTestSuite.php index a9936df922d69259ea8da427a163e296c79b816f..1fb4be33f4c3ad72e44e044223c118fe4560349d 100644 --- a/core/tests/TestSuites/KernelTestSuite.php +++ b/core/tests/TestSuites/KernelTestSuite.php @@ -4,19 +4,10 @@ namespace Drupal\Tests\TestSuites; -@trigger_error('\Drupal\Tests\TestSuites\KernelTestSuite is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - require_once __DIR__ . '/TestSuiteBase.php'; /** * Discovers tests for the kernel test suite. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 - * - * @phpstan-ignore-next-line */ class KernelTestSuite extends TestSuiteBase { diff --git a/core/tests/TestSuites/TestSuiteBase.php b/core/tests/TestSuites/TestSuiteBase.php index c2236293da9f986bfc15061a87c23de9451bd974..70ee9f7c5a1fa4b79960094083b94c5b5ac1aaad 100644 --- a/core/tests/TestSuites/TestSuiteBase.php +++ b/core/tests/TestSuites/TestSuiteBase.php @@ -9,19 +9,9 @@ /** * Base class for Drupal test suites. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 */ abstract class TestSuiteBase extends TestSuite { - public function __construct($theClass = '', string $name = '') { - @trigger_error(__CLASS__ . ' is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - parent::__construct($theClass, $name); - } - /** * Finds extensions in a Drupal installation. * diff --git a/core/tests/TestSuites/UnitTestSuite.php b/core/tests/TestSuites/UnitTestSuite.php index 2daf44f7052a8aecd0e0407751e43582c6578dfa..c24d8f85b94f8898b0968d9d13c18d680a390e84 100644 --- a/core/tests/TestSuites/UnitTestSuite.php +++ b/core/tests/TestSuites/UnitTestSuite.php @@ -4,19 +4,10 @@ namespace Drupal\Tests\TestSuites; -@trigger_error('\Drupal\Tests\TestSuites\UnitTestSuite is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. See https://www.drupal.org/node/3405829', E_USER_DEPRECATED); - require_once __DIR__ . '/TestSuiteBase.php'; /** * Discovers tests for the unit test suite. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no - * replacement and test discovery will be handled differently in PHPUnit 10. - * - * @see https://www.drupal.org/node/3405829 - * - * @phpstan-ignore-next-line */ class UnitTestSuite extends TestSuiteBase {