mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-03 09:50:49 +00:00
[Dep] Add PHPUnit\Framework\TestCase stub on target-repository bootstrap.php (#1924)
This commit is contained in:
parent
a7bdabc86a
commit
9d74e20acb
|
@ -2,9 +2,10 @@
|
|||
|
||||
declare(strict_types = 1);
|
||||
|
||||
// inspired by https://github.com/phpstan/phpstan/blob/master/bootstrap.php
|
||||
|
||||
spl_autoload_register(function (string $class): void {
|
||||
namespace
|
||||
{
|
||||
// inspired by https://github.com/phpstan/phpstan/blob/master/bootstrap.php
|
||||
spl_autoload_register(function (string $class): void {
|
||||
static $composerAutoloader;
|
||||
|
||||
// already loaded in bin/rector.php
|
||||
|
@ -35,9 +36,9 @@ spl_autoload_register(function (string $class): void {
|
|||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if (! interface_exists('UnitEnum')) {
|
||||
if (! interface_exists('UnitEnum')) {
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
|
@ -48,9 +49,9 @@ if (! interface_exists('UnitEnum')) {
|
|||
*/
|
||||
public static function cases(): array;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! interface_exists('BackedEnum')) {
|
||||
if (! interface_exists('BackedEnum')) {
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
|
@ -67,4 +68,15 @@ 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
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user