SimpleTest::testMapSimpleMixed PHP Метод

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

Test for "@var mixed"
public testMapSimpleMixed ( )
    public function testMapSimpleMixed()
    {
        $jm = new JsonMapper();
        $sn = $jm->map(json_decode('{"mixed":12345}'), new JsonMapperTest_Simple());
        $this->assertInternalType('integer', $sn->mixed);
        $this->assertEquals('12345', $sn->mixed);
        $sn = $jm->map(json_decode('{"mixed":"12345"}'), new JsonMapperTest_Simple());
        $this->assertInternalType('string', $sn->mixed);
        $this->assertEquals(12345, $sn->mixed);
    }