Code Duplication    Length = 11-11 lines in 5 locations

tests/Unit/Model/ErrorTest.php 5 locations

@@ 27-37 (lines=11) @@
24
        );
25
    }
26
27
    public function testServerError(): void
28
    {
29
        $error = Error::serverError('someTitle');
30
        self::assertEquals(
31
            [
32
                'status' => 500,
33
                'title' => 'someTitle',
34
            ],
35
            $error->getErrorData()
36
        );
37
    }
38
39
    public function testForbidden(): void
40
    {
@@ 39-49 (lines=11) @@
36
        );
37
    }
38
39
    public function testForbidden(): void
40
    {
41
        $error = Error::forbidden('someTitle');
42
        self::assertEquals(
43
            [
44
                'status' => 403,
45
                'title' => 'someTitle',
46
            ],
47
            $error->getErrorData()
48
        );
49
    }
50
51
    public function testNotFound(): void
52
    {
@@ 51-61 (lines=11) @@
48
        );
49
    }
50
51
    public function testNotFound(): void
52
    {
53
        $error = Error::notFound('someTitle');
54
        self::assertEquals(
55
            [
56
                'status' => 404,
57
                'title' => 'someTitle',
58
            ],
59
            $error->getErrorData()
60
        );
61
    }
62
63
    public function testUnauthorized(): void
64
    {
@@ 63-73 (lines=11) @@
60
        );
61
    }
62
63
    public function testUnauthorized(): void
64
    {
65
        $error = Error::unauthorized('someTitle');
66
        self::assertEquals(
67
            [
68
                'status' => 401,
69
                'title' => 'someTitle',
70
            ],
71
            $error->getErrorData()
72
        );
73
    }
74
75
    public function testInvalid(): void
76
    {
@@ 75-85 (lines=11) @@
72
        );
73
    }
74
75
    public function testInvalid(): void
76
    {
77
        $error = Error::invalid('someTitle');
78
        self::assertEquals(
79
            [
80
                'status' => 400,
81
                'title' => 'someTitle',
82
            ],
83
            $error->getErrorData()
84
        );
85
    }
86
}
87