示例#1
0
 public function testGet()
 {
     $json = json_encode(['city' => 'Pajala']);
     $imago = new Value($json);
     $imago = new JsonDecoder($imago);
     $should = (object) ['city' => 'Pajala'];
     $this->assertEquals($should, $imago->get());
 }
示例#2
0
 public function testTransformer()
 {
     $json = json_encode(['city' => 'Nattavaara']);
     $imago = new Value($json);
     $imago = new Identity($imago);
     $imago = new JsonDecoder($imago);
     $should = implode("\n", ['Filchos\\Imago\\Source\\Value({"value":"{\\"city\\":\\"Nattavaara\\"}"})', 'Filchos\\Imago\\Transformer\\Identity({})', 'Filchos\\Imago\\Transformer\\JsonDecoder({})']);
     $this->assertSame($should, $imago->scent());
 }