Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 52... Línea 52...
52
     * @param array $jwks the JWKS key set.
52
     * @param array $jwks the JWKS key set.
53
     * @param string $jwt the JWT.
53
     * @param string $jwt the JWT.
54
     * @param array $expected the expected outputs/exceptions.
54
     * @param array $expected the expected outputs/exceptions.
55
     * @return void
55
     * @return void
56
     */
56
     */
57
    public function test_fix_jwks_alg(array $jwks, string $jwt, array $expected) {
57
    public function test_fix_jwks_alg(array $jwks, string $jwt, array $expected): void {
58
        if (isset($expected['exception'])) {
58
        if (isset($expected['exception'])) {
59
            $this->expectException($expected['exception']);
59
            $this->expectException($expected['exception']);
60
        }
60
        }
61
        $fixed = jwks_helper::fix_jwks_alg($jwks, $jwt);
61
        $fixed = jwks_helper::fix_jwks_alg($jwks, $jwt);
62
        $this->assertEquals($expected['jwks'], $fixed);
62
        $this->assertEquals($expected['jwks'], $fixed);