GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#152)
by joseph
19:30
created

UuidFactoryTest::setUpBeforeClass()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 0
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Small\Entity\Fields\Factories;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Factories\UuidFactory;
6
use PHPUnit\Framework\TestCase;
7
use Ramsey\Uuid\Uuid;
8
9
/**
10
 * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Factories\UuidFactory
11
 * @small
12
 */
13
class UuidFactoryTest extends TestCase
14
{
15
    /**
16
     * @var UuidFactory
17
     */
18
    private static $factory;
19
20
    /**
21
     * @SuppressWarnings(PHPMD.StaticAccess)
22
     */
23
    public static function setUpBeforeClass()
24
    {
25
        $factory = Uuid::getFactory();
26
        if ($factory instanceof \Ramsey\Uuid\UuidFactory) {
27
            self::$factory = new UuidFactory($factory);
28
29
            return;
30
        }
31
        throw new \LogicException('This should never happen');
32
    }
33
34
    /**
35
     * @test
36
     * @throws \Exception
37
     */
38
    public function itCanGenerateOrderedTimeUuids(): void
39
    {
40
        $actual = self::$factory->getOrderedTimeUuid();
41
        self::assertSame(1, $actual->getVersion());
42
    }
43
44
    /**
45
     * @test
46
     * @throws \Exception
47
     */
48
    public function itCanGenerateStandardUuids(): void
49
    {
50
        $actual = self::$factory->getUuid();
51
        self::assertSame(4, $actual->getVersion());
52
    }
53
}
54