Code Duplication    Length = 14-14 lines in 2 locations

tests/unit/Authenticator/JwtKeyTest.php 2 locations

@@ 124-137 (lines=14) @@
121
    /**
122
     * @test
123
     */
124
    public function validationWillFailWhenPrincipleIsMissing()
125
    {
126
        $claims = ['prn' => 'joe'];
127
128
        $key = new JwtKey(['secret' => 'Buy the book']);
129
        $key->validateClaims($claims);
130
131
        unset($claims['prn']);
132
133
        $this->setExpectedException(MissingClaimsException::class);
134
135
        $key = new JwtKey(['secret' => 'Buy the book']);
136
        $key->validateClaims($claims);
137
    }
138
139
140
    /**
@@ 143-156 (lines=14) @@
140
    /**
141
     * @test
142
     */
143
    public function validationWillFailWhenSubjectMissing()
144
    {
145
        $claims = ['sub' => 'joe'];
146
147
        $key = new JwtKey(['secret' => 'Buy the book']);
148
        $key->validateClaims($claims);
149
150
        unset($claims['sub']);
151
152
        $this->setExpectedException(MissingClaimsException::class);
153
154
        $key = new JwtKey(['secret' => 'Buy the book']);
155
        $key->validateClaims($claims);
156
    }
157
158
    /**
159
     * @test