ProtobufTest\Binary\Platform\GmpNegativeEncoderTest::testEncodeSFixed64 PHP Method

testEncodeSFixed64() public method

public testEncodeSFixed64 ( )
    public function testEncodeSFixed64()
    {
        $encoder = new GmpNegativeEncoder();
        // make sure runs as 64 bit
        $this->setPropertyValue($encoder, 'is32Bit', false);
        $bytes = $encoder->encodeSFixed64(-123456789123456789);
        $expected = [1 => 41195, 2 => 21295, 3 => 25780, 4 => 65097];
        $this->assertEquals($expected, unpack('v*', $bytes));
    }