<?php

declare(strict_types=1);
namespace Tests\Adawolfa\Retrofit;
use Adawolfa\Retrofit\Loader;
use PHPUnit\Framework\TestCase as TC;
use ReflectionClass;
use ReflectionException;
use RuntimeException;

abstract class TestCase extends TC
{

	final protected static function createReflection(string $interface): ReflectionClass
	{
		try {
			return new ReflectionClass((new Loader)->load($interface));
		} catch (ReflectionException $exception) {
			throw new RuntimeException(previous: $exception);
		}
	}

}