diff --git a/core/tests/Drupal/Tests/Phpunit4CompatibilityTest.php b/core/tests/Drupal/Tests/Phpunit4CompatibilityTest.php deleted file mode 100644 index 639e6fa35f3e8ae7b24ed6cbb8717bede81866bf..0000000000000000000000000000000000000000 --- a/core/tests/Drupal/Tests/Phpunit4CompatibilityTest.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -namespace Drupal\Tests; - -/** - * Tests existence of the PHPUnit4 backward compatibility classes. - * - * @group Tests - */ -class Phpunit4CompatibilityTest extends UnitTestCase { - - /** - * Tests existence of \PHPUnit_Framework_AssertionFailedError. - */ - public function testFrameworkAssertionFailedError() { - $this->assertTrue(class_exists('\PHPUnit_Framework_AssertionFailedError')); - } - - /** - * Tests existence of \PHPUnit_Framework_Constraint_Count. - */ - public function testFrameworkConstraintCount() { - $this->assertTrue(class_exists('\PHPUnit_Framework_Constraint_Count')); - } - - /** - * Tests existence of \PHPUnit_Framework_Error. - */ - public function testFrameworkError() { - $this->assertTrue(class_exists('\PHPUnit_Framework_Error')); - } - - /** - * Tests existence of \PHPUnit_Framework_Error_Warning. - */ - public function FrameworkErrorWarning() { - $this->assertTrue(class_exists('\PHPUnit_Framework_Error_Warning')); - } - - /** - * Tests existence of \PHPUnit_Framework_Exception. - */ - public function testFrameworkException() { - $this->assertTrue(class_exists('\PHPUnit_Framework_Exception')); - } - - /** - * Tests existence of \PHPUnit_Framework_ExpectationFailedException. - */ - public function testFrameworkExpectationFailedException() { - $this->assertTrue(class_exists('\PHPUnit_Framework_ExpectationFailedException')); - } - - /** - * Tests existence of \PHPUnit_Framework_MockObject_Matcher_InvokedRecorder. - */ - public function testFrameworkMockObjectMatcherInvokedRecorder() { - $this->assertTrue(class_exists('\PHPUnit_Framework_MockObject_Matcher_InvokedRecorder')); - } - - /** - * Tests existence of \PHPUnit_Framework_SkippedTestError. - */ - public function testFrameworkSkippedTestError() { - $this->assertTrue(class_exists('\PHPUnit_Framework_SkippedTestError')); - } - - /** - * Tests existence of \PHPUnit_Framework_TestCase. - */ - public function testFrameworkTestCase() { - $this->assertTrue(class_exists('\PHPUnit_Framework_TestCase')); - } - - /** - * Tests existence of \PHPUnit_Util_Test. - */ - public function testUtilTest() { - $this->assertTrue(class_exists('\PHPUnit_Util_Test')); - } - - /** - * Tests existence of \PHPUnit_Util_XML. - */ - public function testUtilXml() { - $this->assertTrue(class_exists('\PHPUnit_Util_XML')); - } - -} diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php index 467e6af6e603900cbcfe87e3ed54c19c63b1855a..4146f999a75e5cba42ee7d1820da41c0e2d09bc7 100644 --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -8,17 +8,6 @@ */ use Drupal\Component\Assertion\Handle; -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\Constraint\Count; -use PHPUnit\Framework\Error\Error; -use PHPUnit\Framework\Error\Warning; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\MockObject\Matcher\InvokedRecorder; -use PHPUnit\Framework\SkippedTestError; -use PHPUnit\Framework\TestCase; -use PHPUnit\Util\Test; -use PHPUnit\Util\Xml; /** * Finds all valid extension directories recursively within a given directory. @@ -184,18 +173,3 @@ function drupal_phpunit_populate_class_loader() { // thrown if an assert fails, but this call does not turn runtime assertions on // if they weren't on already. Handle::register(); - -// PHPUnit 4 to PHPUnit 6 bridge. Tests written for PHPUnit 4 need to work on -// PHPUnit 6 with a minimum of fuss. -// @todo provided for BC; remove in Drupal 9. -class_alias(AssertionFailedError::class, '\PHPUnit_Framework_AssertionFailedError'); -class_alias(Count::class, '\PHPUnit_Framework_Constraint_Count'); -class_alias(Error::class, '\PHPUnit_Framework_Error'); -class_alias(Warning::class, '\PHPUnit_Framework_Error_Warning'); -class_alias(ExpectationFailedException::class, '\PHPUnit_Framework_ExpectationFailedException'); -class_alias(Exception::class, '\PHPUnit_Framework_Exception'); -class_alias(InvokedRecorder::class, '\PHPUnit_Framework_MockObject_Matcher_InvokedRecorder'); -class_alias(SkippedTestError::class, '\PHPUnit_Framework_SkippedTestError'); -class_alias(TestCase::class, '\PHPUnit_Framework_TestCase'); -class_alias(Test::class, '\PHPUnit_Util_Test'); -class_alias(Xml::class, '\PHPUnit_Util_XML');