public function testDecoding() { $formatter = new JSON(); $data = (object) array('name' => 'Joe', 'age' => 21, 'employed' => true); $raw = '{"name":"Joe","age":21,"employed":true}'; $this->assertEquals($data, $formatter->decode($raw)); }