Code Duplication    Length = 7-7 lines in 2 locations

tests/unit/AuthMiddlewareTest.php 2 locations

@@ 74-80 (lines=7) @@
71
     * @throws \Doctrine\ORM\Query\QueryException
72
     * @throws \Potievdev\SlimRbac\Exception\InvalidArgumentException
73
     */
74
    public function testSuccessCase()
75
    {
76
        $middleware = new AuthMiddleware($this->authOptions);
77
        $request = $this->request->withAttribute('userId', self::ADMIN_USER_ID);
78
        $response = $middleware->__invoke($request, $this->response, $this->callable);
79
        $this->assertEquals(200, $response->getStatusCode());
80
    }
81
82
    /**
83
     * @throws \Doctrine\ORM\Query\QueryException
@@ 86-92 (lines=7) @@
83
     * @throws \Doctrine\ORM\Query\QueryException
84
     * @throws \Potievdev\SlimRbac\Exception\InvalidArgumentException
85
     */
86
    public function testFailureCase()
87
    {
88
        $middleware = new AuthMiddleware($this->authOptions);
89
        $request = $this->request->withAttribute('userId', self::MODERATOR_USER_ID);
90
        $response = $middleware->__invoke($request, $this->response, $this->callable);
91
        $this->assertEquals(403, $response->getStatusCode());
92
    }
93
}
94