Elgg\Json\EmptyKeyEncodingTest::testEncodeWithGivenKey PHP Метод

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

    function testEncodeWithGivenKey()
    {
        $key = 'gyufg78r3gyfryu';
        $value = array($key => 'foo');
        $encoding = new EmptyKeyEncoding($key);
        $json = $encoding->encode($value);
        $this->assertEquals('{"":"foo"}', $json);
    }