public function testQuery1()
{
$query = $this->_getEntityManager()->createQuery('SELECT ST_AsEWKT(ST_FlipCoordinates(ST_GeomFromEWKT(\'POINT(1 2)\'))) 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 => 'POINT(2 1)');
$this->assertEquals($expected, $result, '', 0.0001);
}