Code Duplication    Length = 14-18 lines in 2 locations

app/Containers/Authentication/UI/API/Tests/Functional/UserLoginTest.php 1 location

@@ 50-67 (lines=18) @@
47
        $this->assertResponseContainKeys(['id', 'token'], $response);
48
    }
49
50
    public function testUserLoginExistingUserUsingGetRequest_()
51
    {
52
        $data = [
53
            'email'    => '[email protected]',
54
            'password' => 'secret',
55
        ];
56
57
        // send the HTTP request
58
        $response = $this->endpoint('get@login')->makeCall($data);
59
60
        // assert response status is correct
61
        $this->assertEquals('405', $response->getStatusCode());
62
63
        // assert message is correct
64
        $this->assertResponseContainKeyValue([
65
            'message' => '405 Method Not Allowed',
66
        ], $response);
67
    }
68
69
    public function testUserLoginNonExistingUser_()
70
    {

app/Containers/Authorization/UI/API/Tests/Functional/CreateRoleTest.php 1 location

@@ 43-56 (lines=14) @@
40
        $this->assertEquals($data['name'], $responseContent->data->name);
41
    }
42
43
    public function testCreateRoleWithWrongName_()
44
    {
45
        $data = [
46
            'name'         => 'include space',
47
            'display_name' => 'manager',
48
            'description'  => 'he manages things',
49
        ];
50
51
        // send the HTTP request
52
        $response = $this->makeCall($data);
53
54
        // assert response status is correct
55
        $this->assertEquals('422', $response->getStatusCode());
56
    }
57
58
}
59