404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.216.11.230: ~ $
<?php

declare(strict_types=1);

namespace Ramsey\Uuid\Test\Generator;

use PHPUnit\Framework\MockObject\MockObject;
use Ramsey\Uuid\Converter\TimeConverterInterface;
use Ramsey\Uuid\Generator\TimeGeneratorFactory;
use Ramsey\Uuid\Generator\TimeGeneratorInterface;
use Ramsey\Uuid\Provider\NodeProviderInterface;
use Ramsey\Uuid\Provider\TimeProviderInterface;
use Ramsey\Uuid\Test\TestCase;

class TimeGeneratorFactoryTest extends TestCase
{
    public function testGeneratorReturnsNewGenerator(): void
    {
        /** @var MockObject & TimeProviderInterface $timeProvider */
        $timeProvider = $this->getMockBuilder(TimeProviderInterface::class)->getMock();

        /** @var MockObject & NodeProviderInterface $nodeProvider */
        $nodeProvider = $this->getMockBuilder(NodeProviderInterface::class)->getMock();

        /** @var MockObject & TimeConverterInterface $timeConverter */
        $timeConverter = $this->getMockBuilder(TimeConverterInterface::class)->getMock();

        $factory = new TimeGeneratorFactory($nodeProvider, $timeConverter, $timeProvider);
        $generator = $factory->getGenerator();

        $this->assertInstanceOf(TimeGeneratorInterface::class, $generator);
    }
}

Filemanager

Name Type Size Permission Actions
CombGeneratorTest.php File 4.65 KB 0644
DceSecurityGeneratorTest.php File 11.4 KB 0644
DefaultNameGeneratorTest.php File 2.48 KB 0644
DefaultTimeGeneratorTest.php File 6.88 KB 0644
NameGeneratorFactoryTest.php File 464 B 0644
PeclUuidNameGeneratorTest.php File 3.48 KB 0644
PeclUuidRandomGeneratorTest.php File 757 B 0644
PeclUuidTimeGeneratorTest.php File 747 B 0644
RandomBytesGeneratorTest.php File 1.89 KB 0644
RandomGeneratorFactoryTest.php File 498 B 0644
RandomLibAdapterTest.php File 2.28 KB 0644
TimeGeneratorFactoryTest.php File 1.21 KB 0644
UnixTimeGeneratorTest.php File 7.36 KB 0644