public function testQuery1()
{
$query = $this->_getEntityManager()->createQuery('SELECT ST_AsText(ST_Intersection(ST_GeomFromText(\'POINT(0 0)\'), ST_GeomFromText(\'LINESTRING (0 0, 0 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(0 0)');
$this->assertEquals($expected, $result, '', 0.0001);
}