public function testSetType_getInRightOrder() { $jwt = new Jwt($this->claims, $this->secret, $this->header); $type = 'jwt'; $jwt->setType($type); $expected = $this->header; unset($expected['typ']); $expected['typ'] = $type; $this->assertTrue($expected === $jwt->getHeaders()->get()); }