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

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

Test the conversion of the header to an array
public testToArray ( )
    public function testToArray()
    {
        $key = 'somekey';
        $algorithm = 'H256';
        $type = 'mytype';
        $header = new Header($key, $algorithm, $type);
        $this->assertEquals($header->toArray(), array('typ' => $type, 'alg' => $algorithm));
    }