CrEOF\Spatial\Tests\PHP\Types\Spatial\Geometry\LineStringTest::testJson PHP Method

testJson() public method

public testJson ( )
    public function testJson()
    {
        $expected = "{\"type\":\"LineString\",\"coordinates\":[[0,0],[0,5],[5,0],[0,0]]}";
        $lineString = new LineString(array(array(0, 0), array(0, 5), array(5, 0), array(0, 0)));
        $this->assertEquals($expected, $lineString->toJson());
    }