CrEOF\Spatial\Tests\PHP\Types\Geometry\MultiLineStringTest::testJson PHP Метод

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

public testJson ( )
    public function testJson()
    {
        $expected = '{"type":"MultiLineString","coordinates":[[[0,0],[10,0],[10,10],[0,10],[0,0]],[[0,0],[10,0],[10,10],[0,10],[0,0]]]}';
        $lineStrings = array(array(array(0, 0), array(10, 0), array(10, 10), array(0, 10), array(0, 0)), array(array(0, 0), array(10, 0), array(10, 10), array(0, 10), array(0, 0)));
        $multiLineString = new MultiLineString($lineStrings);
        $this->assertEquals($expected, $multiLineString->toJson());
    }