use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\ReflectionClassResource;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
class ReflectionClassResourceTest extends TestCase
{ public function testToString() { $res =
new ReflectionClassResource(new \
ReflectionClass(\ErrorException::
class));
$this->
assertSame('reflection.ErrorException',
(string) $res);
} public function testSerializeUnserialize() { $res =
new ReflectionClassResource(new \
ReflectionClass(DummyInterface::
class));
$ser =
unserialize(serialize($res));
$this->
assertTrue($res->
isFresh(0
));
$this->
assertTrue($ser->
isFresh(0
));