<?php12namespace Pterodactyl\Tests\Traits;34use Mockery as m;5use Ramsey\Uuid\Uuid;6use Ramsey\Uuid\UuidFactory;78trait MocksUuids9{10/**11* The known UUID string.12*/13protected string $knownUuid = 'ffb5c3a6-ab17-43ab-97f0-8ff37ccd7f5f';1415/**16* Setup a factory mock to produce the same UUID whenever called.17*/18public function setKnownUuidFactory(): void19{20$uuid = Uuid::fromString($this->getKnownUuid());21$factoryMock = m::mock(UuidFactory::class . '[uuid4]', [22'uuid4' => $uuid,23]);2425Uuid::setFactory($factoryMock);26}2728/**29* Returns the known UUID for tests to use.30*/31public function getKnownUuid(): string32{33return $this->knownUuid;34}35}363738