public function parseMustReturnANonSignedTokenWhenSignatureAlgorithmIsNone()
{
$this->decoder->expects($this->at(0))->method('base64UrlDecode')->with('a')->willReturn('a_dec');
$this->decoder->expects($this->at(1))->method('jsonDecode')->with('a_dec')->willReturn(['typ' => 'JWT', 'alg' => 'none']);
$this->decoder->expects($this->at(2))->method('base64UrlDecode')->with('b')->willReturn('b_dec');
$this->decoder->expects($this->at(3))->method('jsonDecode')->with('b_dec')->willReturn(['aud' => 'test']);
$parser = $this->createParser();
$token = $parser->parse('a.b.c');
self::assertAttributeEquals(['typ' => 'JWT', 'alg' => 'none'], 'headers', $token);
self::assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $token);
self::assertAttributeEquals(null, 'signature', $token);
self::assertAttributeEquals(['a', 'b'], 'payload', $token);
}