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