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;
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);
}
trait TestCompatibilityTrait {
use ProphecyTrait;
}