public function testStringMap_Write() { $args = new \ThriftTest\ThriftTest_testStringMap_args(); $args->thing = Fixtures::$testArgs['testStringMap']; $args->write($this->protocol); $actual = $this->transport->read(BUFSIZ); $expected = TestTJSONProtocol_Fixtures::$testArgsJSON['testStringMap']; $this->assertEquals($expected, $actual); }
public function testStringMap_Write() { $args = new \ThriftTest\ThriftTest_testStringMap_args(); $args->thing = Fixtures::$testArgs['testStringMap']; $args->write($this->protocol); $actual = $this->transport->read(BUFSIZ); $expected = TestTJSONProtocol_Fixtures::$testArgsJSON['testStringMap']; /* * The $actual returns unescaped string. * It is required to to decode then encode it again * to get the expected escaped unicode. */ $this->assertEquals($expected, json_encode(json_decode($actual))); }