You are here

TestCompatibilityTrait.php in Drupal 9

File

core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit9/TestCompatibilityTrait.php
View source
<?php

namespace Drupal\TestTools\PhpUnitCompatibility\PhpUnit9;

use Prophecy\PhpUnit\ProphecyTrait;

// @todo Replace with a proper dependency when we stop supporting PHPUnit 8.
if (!trait_exists(ProphecyTrait::class)) {
  print "Drupal requires Prophecy PhpUnit when using PHPUnit 9 or greater. Please use 'composer require --dev phpspec/prophecy-phpunit:^2' to ensure that it is present.\n";
  exit(1);
}

/**
 * Drupal's forward compatibility layer with multiple versions of PHPUnit.
 */
trait TestCompatibilityTrait {
  use ProphecyTrait;

}

Traits

Namesort descending Description
TestCompatibilityTrait Drupal's forward compatibility layer with multiple versions of PHPUnit.