TestCompatibilityTrait.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/TestCompatibilityTrait.php
- 8.9.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/TestCompatibilityTrait.php
- 10 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit9/TestCompatibilityTrait.php
- 11.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit9/TestCompatibilityTrait.php
- 11.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit10/TestCompatibilityTrait.php
Namespace
Drupal\TestTools\PhpUnitCompatibility\PhpUnit9File
-
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
Title | Deprecated | Summary |
---|---|---|
TestCompatibilityTrait | Drupal's forward compatibility layer with multiple versions of PHPUnit. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.