Psecio\Jwt\HeaderTest::testConvertToString PHP Метод

testConvertToString() публичный Метод

Test the conversion of the header to a string of JSON
public testConvertToString ( )
    public function testConvertToString()
    {
        $key = 'somekey';
        $algorithm = 'H256';
        $type = 'mytype';
        $header = new Header($key, $algorithm, $type);
        $this->assertEquals((string) $header, '{"typ":"' . $type . '","alg":"' . $algorithm . '"}');
    }