Verified Commit af344093 authored by Andrei Mateescu's avatar Andrei Mateescu
Browse files

task: #3582118 Remove the PHPUnitCompatibiltyTrait

By: mondrake
By: smustgrave
parent b7e4f745
Loading
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
use Drupal\Component\FileSystem\FileSystem as DrupalFilesystem;
use Drupal\Tests\DrupalTestCaseTrait;
use Drupal\Tests\DrupalTestBrowser;
use Drupal\Tests\PhpUnitCompatibilityTrait;
use Drupal\TestTools\Extension\RequiresComposerTrait;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem;
@@ -64,7 +63,6 @@ abstract class BuildTestBase extends TestCase {

  use DrupalTestCaseTrait;
  use RequiresComposerTrait;
  use PhpUnitCompatibilityTrait;

  /**
   * The working directory where this test will manipulate files.
+0 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
use Drupal\Tests\DrupalTestCaseTrait;
use Drupal\Tests\ExtensionListTestTrait;
use Drupal\Tests\HttpKernelUiHelperTrait;
use Drupal\Tests\PhpUnitCompatibilityTrait;
use Drupal\Tests\RandomGeneratorTrait;
use Drupal\Tests\TestRequirementsTrait;
use Drupal\TestTools\Comparator\MarkupInterfaceComparator;
@@ -104,7 +103,6 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa
  use ConfigTestTrait;
  use ExtensionListTestTrait;
  use TestRequirementsTrait;
  use PhpUnitCompatibilityTrait;
  use ProphecyTrait;
  use BrowserHtmlDebugTrait;
  use HttpKernelUiHelperTrait;
+0 −13
Original line number Diff line number Diff line
<?php

declare(strict_types=1);

namespace Drupal\TestTools\PhpUnitCompatibility\PhpUnit12;

/**
 * Drupal's forward compatibility layer with multiple versions of PHPUnit.
 *
 * @internal
 */
trait TestCompatibilityTrait {
}
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ abstract class BrowserTestBase extends TestCase {
    createUser as drupalCreateUser;
  }
  use XdebugRequestTrait;
  use PhpUnitCompatibilityTrait;
  use ExtensionListTestTrait;

  /**
+0 −30
Original line number Diff line number Diff line
<?php

declare(strict_types=1);

namespace Drupal\Tests;

use Drupal\TestTools\PhpUnitCompatibility\PhpUnit12\TestCompatibilityTrait;
use Drupal\TestTools\PhpUnitCompatibility\RunnerVersion;

// In order to manage different method signatures between PHPUnit versions, we
// dynamically load a compatibility trait dependent on the PHPUnit runner
// version.
class_alias("Drupal\TestTools\PhpUnitCompatibility\PhpUnit" . RunnerVersion::getMajor() . "\TestCompatibilityTrait", 'Drupal\Tests\PhpUnitCompatibilityTrait');

// Allow static analysis to find a trait.
if (FALSE) {

  /**
   * Makes Drupal's test API forward compatible with future PHPUnit releases.
   *
   * This stub is present here to allow PHPStan identify the methods present
   * in the version-bound trait.
   */
  trait PhpUnitCompatibilityTrait {

    use TestCompatibilityTrait;

  }

}
Loading