Code Duplication    Length = 18-18 lines in 2 locations

app/Containers/User/UI/API/Tests/Functional/GetAllAdminsTest.php 1 location

@@ 54-71 (lines=18) @@
51
    /**
52
     * @test
53
     */
54
    public function testGetAllAdminsByNonAdmin_()
55
    {
56
        $this->getTestingUserWithoutAccess();
57
58
        // create some fake users
59
        factory(User::class, 2)->create();
60
61
        // send the HTTP request
62
        $response = $this->makeCall();
63
64
        // assert response status is correct
65
        $response->assertStatus(403);
66
67
        $this->assertResponseContainKeyValue([
68
            'errors' => 'You have no access to this resource!',
69
            'message' => 'This action is unauthorized.',
70
        ]);
71
    }
72
73
}
74

app/Containers/User/UI/API/Tests/Functional/GetAllUsersTest.php 1 location

@@ 50-67 (lines=18) @@
47
    /**
48
     * @test
49
     */
50
    public function testGetAllUsersByNonAdmin_()
51
    {
52
        $this->getTestingUserWithoutAccess();
53
54
        // create some fake users
55
        factory(User::class, 2)->create();
56
57
        // send the HTTP request
58
        $response = $this->makeCall();
59
60
        // assert response status is correct
61
        $response->assertStatus(403);
62
63
        $this->assertResponseContainKeyValue([
64
            'errors' => 'You have no access to this resource!',
65
            'message' => 'This action is unauthorized.',
66
        ]);
67
    }
68
69
    /**
70
     * @test