mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 16:43:48 +00:00
fix cs
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Services\Import;
|
||||
|
||||
use Chill\MainBundle\Service\Import\GeographicalUnitBaseImporter;
|
||||
@@ -8,7 +17,11 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
class GeographicalUnitBaseImporterTest extends KernelTestCase
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class GeographicalUnitBaseImporterTest extends KernelTestCase
|
||||
{
|
||||
private Connection $connection;
|
||||
|
||||
@@ -42,10 +55,10 @@ class GeographicalUnitBaseImporterTest extends KernelTestCase
|
||||
|
||||
$importer->finalize();
|
||||
|
||||
$unit = $this->connection->executeQuery("
|
||||
$unit = $this->connection->executeQuery('
|
||||
SELECT unitname, unitrefid, cmgul.refid AS layerrefid, cmgul.name AS layername, ST_AsText(ST_snapToGrid(ST_Transform(u.geom, 3812), 1)) AS geom
|
||||
FROM chill_main_geographical_unit u JOIN chill_main_geographical_unit_layer cmgul on u.layer_id = cmgul.id
|
||||
WHERE u.unitrefid = ?", ['layer_one']);
|
||||
FROM chill_main_geographical_unit u JOIN chill_main_geographical_unit_layer cmgul on u.layer_id = cmgul.id
|
||||
WHERE u.unitrefid = ?', ['layer_one']);
|
||||
|
||||
$results = $unit->fetchAssociative();
|
||||
|
||||
@@ -71,10 +84,10 @@ class GeographicalUnitBaseImporterTest extends KernelTestCase
|
||||
|
||||
$importer->finalize();
|
||||
|
||||
$unit = $this->connection->executeQuery("
|
||||
$unit = $this->connection->executeQuery('
|
||||
SELECT unitname, unitrefid, cmgul.refid AS layerrefid, cmgul.name AS layername, ST_AsText(ST_snapToGrid(ST_Transform(u.geom, 3812), 1)) AS geom
|
||||
FROM chill_main_geographical_unit u JOIN chill_main_geographical_unit_layer cmgul on u.layer_id = cmgul.id
|
||||
WHERE u.unitrefid = ?", ['layer_one']);
|
||||
FROM chill_main_geographical_unit u JOIN chill_main_geographical_unit_layer cmgul on u.layer_id = cmgul.id
|
||||
WHERE u.unitrefid = ?', ['layer_one']);
|
||||
|
||||
$results = $unit->fetchAssociative();
|
||||
|
||||
@@ -83,7 +96,5 @@ class GeographicalUnitBaseImporterTest extends KernelTestCase
|
||||
$this->assertEquals(json_decode($results['layername'], true), ['fr' => 'Test Layer fixed']);
|
||||
$this->assertEquals($results['layerrefid'], 'test');
|
||||
$this->assertEquals($results['geom'], 'MULTIPOLYGON(((130 120,45 40,10 40,130 120)),((0 0,15 5,40 10,10 20,0 0)))');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user