mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-03 06:44:07 +01:00
Please try it out in your own environments. I have not considered other cases than CTestCase
20 lines
596 B
PHP
20 lines
596 B
PHP
<?php
|
|
/*
|
|
* Ensures compatibility with PHPUnit < 9.x
|
|
*/
|
|
|
|
if(!class_exists('PHPUnit_Framework_Constraint') && class_exists('PHPUnit\Framework\Constraint\Constraint'))
|
|
{
|
|
class_alias('PHPUnit\Framework\Constraint\Constraint','PHPUnit_Framework_Constraint');
|
|
}
|
|
|
|
if(!class_exists('PHPUnit_Framework_TestCase') && class_exists('PHPUnit\Framework\TestCase'))
|
|
{
|
|
class_alias('PHPUnit\Framework\TestCase','PHPUnit_Framework_TestCase');
|
|
}
|
|
|
|
if(!class_exists('PHPUnit_Runner_Version') && class_exists('PHPUnit\Runner\Version'))
|
|
{
|
|
class_alias('PHPUnit\Runner\Version','PHPUnit_Runner_Version');
|
|
}
|