Jsor\Doctrine\PostGIS\Functions\ST_3DDFullyWithinTest::testQuery1 PHP Method

testQuery1() public method

public testQuery1 ( )
    public function testQuery1()
    {
        $query = $this->_getEntityManager()->createQuery('SELECT ST_3DDFullyWithin(ST_GeomFromEWKT(\'POINT(1 1 2)\'), ST_GeomFromEWKT(\'LINESTRING(1 5 2, 2 7 20, 1 9 100, 14 12 3)\'), 10) FROM Jsor\\Doctrine\\PostGIS\\PointsEntity');
        $result = $query->getSingleResult();
        array_walk_recursive($result, function (&$data) {
            if (is_resource($data)) {
                $data = stream_get_contents($data);
                if (false !== ($pos = strpos($data, 'x'))) {
                    $data = substr($data, $pos + 1);
                }
            }
            if (is_string($data)) {
                $data = trim($data);
            }
        });
        $expected = array(1 => false);
        $this->assertEquals($expected, $result, '', 0.0001);
    }
ST_3DDFullyWithinTest