Code Duplication    Length = 7-7 lines in 2 locations

tests/unit/AuthMiddlewareTest.php 2 locations

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