[Dep] Add PHPUnit\Framework\TestCase stub on target-repository bootstrap.php (#1924)

This commit is contained in:
Abdul Malik Ikhsan 2022-03-13 00:26:48 +07:00 committed by GitHub
parent a7bdabc86a
commit 9d74e20acb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,9 @@
declare(strict_types = 1);
namespace
{
// inspired by https://github.com/phpstan/phpstan/blob/master/bootstrap.php
spl_autoload_register(function (string $class): void {
static $composerAutoloader;
@ -68,3 +69,14 @@ if (! interface_exists('BackedEnum')) {
public static function tryFrom($value);
}
}
}
// @see https://github.com/rectorphp/rector/issues/6531
namespace PHPUnit\Framework
{
if (! class_exists('PHPUnit\Framework\TestCase')) {
abstract class TestCase
{
}
}
}