Code Duplication    Length = 11-11 lines in 2 locations

tests/functional/RbacApiTest.php 2 locations

@@ 50-60 (lines=11) @@
47
    /**
48
     * @test
49
     */
50
    public function cannotGetUserContentAsGuest()
51
    {
52
        $this->createClientForUser('guest');
53
54
        $this->expectException(ApiResponseErrorException::class);
55
        $this->expectExceptionCode(Response::HTTP_FORBIDDEN);
56
57
        $string = $this->get('/basic-auth/v1/rbac-user');
58
59
        $this->assertSame($string, 'USER CONTENT');
60
    }
61
62
    /**
63
     * @test
@@ 90-100 (lines=11) @@
87
    /**
88
     * @test
89
     */
90
    public function cannotGetAdminContentAsUser()
91
    {
92
        $this->createClientForUser('user');
93
94
        $this->expectException(ApiResponseErrorException::class);
95
        $this->expectExceptionCode(Response::HTTP_FORBIDDEN);
96
97
        $string = $this->get('/basic-auth/v1/rbac-admin');
98
99
        $this->assertSame($string, 'USER CONTENT');
100
    }
101
102
    private function createClientForUser(string $user)
103
    {