From bd59467b6ef4507e9c1e39d51c21fd8efc9829ab Mon Sep 17 00:00:00 2001 From: Riccardo Beltrami Date: Thu, 28 Sep 2023 17:07:35 +0200 Subject: [PATCH 1/2] [Bugfix] Load relation from embedded layers --- lizmap/modules/lizmap/lib/Project/QgisProject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lizmap/modules/lizmap/lib/Project/QgisProject.php b/lizmap/modules/lizmap/lib/Project/QgisProject.php index cc895e2576..616960784c 100644 --- a/lizmap/modules/lizmap/lib/Project/QgisProject.php +++ b/lizmap/modules/lizmap/lib/Project/QgisProject.php @@ -1194,11 +1194,11 @@ protected function readXmlProject($qgs_path) $this->WMSInformation = $this->readWMSInformation($qgsXml); $this->canvasColor = $this->readCanvasColor($qgsXml); $this->allProj4 = $this->readAllProj4($qgsXml); - list($this->relations, $this->relationsFields) = $this->readRelations($qgsXml); $this->themes = $this->readThemes($qgsXml); $this->customProjectVariables = $this->readCustomProjectVariables($qgsXml); $this->useLayerIDs = $this->readUseLayerIDs($qgsXml); $this->layers = $this->readLayers($qgsXml); + list($this->relations, $this->relationsFields) = $this->readRelations($qgsXml); } protected function readWMSInformation($qgsLoad) From 5521b56719d0ecdfdfa88f5c4a8758ff8b8e95d6 Mon Sep 17 00:00:00 2001 From: Riccardo Beltrami Date: Thu, 28 Sep 2023 17:07:58 +0200 Subject: [PATCH 2/2] added tests --- .../playwright/embedded-relation.spec.ts | 102 ++ .../qgis-projects/tests/relations_project.qgs | 1371 +++++++++++++++++ .../tests/relations_project.qgs.cfg | 166 ++ .../tests/relations_project_embed.qgs | 388 +++++ .../tests/relations_project_embed.qgs.cfg | 166 ++ tests/qgis-projects/tests/test_embed.gpkg | Bin 0 -> 118784 bytes .../units/classes/Project/QgisProjectTest.php | 59 + .../Project/Ressources/relations_project.qgs | 1371 +++++++++++++++++ .../Ressources/relations_project_embed.qgs | 388 +++++ tests/units/testslib/QgisProjectForTests.php | 23 + 10 files changed, 4034 insertions(+) create mode 100644 tests/end2end/playwright/embedded-relation.spec.ts create mode 100644 tests/qgis-projects/tests/relations_project.qgs create mode 100644 tests/qgis-projects/tests/relations_project.qgs.cfg create mode 100644 tests/qgis-projects/tests/relations_project_embed.qgs create mode 100644 tests/qgis-projects/tests/relations_project_embed.qgs.cfg create mode 100644 tests/qgis-projects/tests/test_embed.gpkg create mode 100644 tests/units/classes/Project/Ressources/relations_project.qgs create mode 100644 tests/units/classes/Project/Ressources/relations_project_embed.qgs diff --git a/tests/end2end/playwright/embedded-relation.spec.ts b/tests/end2end/playwright/embedded-relation.spec.ts new file mode 100644 index 0000000000..b2a69cfaeb --- /dev/null +++ b/tests/end2end/playwright/embedded-relation.spec.ts @@ -0,0 +1,102 @@ +import { test, expect } from '@playwright/test'; + +test.describe('Display embedded relation in popup',()=>{ + test.beforeEach(async ({ page }) => { + const url = '/index.php/view/map/?repository=testsrepository&project=relations_project_embed'; + await page.goto(url, { waitUntil: 'networkidle' }); + await page.locator('#dock-close').click(); + }); + + test('Visualize popup for embedded layers', async ({ page }) => { + + let getFeatureInfoRequestPromise = page.waitForRequest(request => request.method() === 'POST' && request.postData().includes('GetFeatureInfo')); + + //first point + await page.locator('#OpenLayers_Layer_Vector_45 canvas').click({ + position: { + x: 74, + y: 40 + } + }); + + await getFeatureInfoRequestPromise; + + //time for rendering the popup + await page.waitForTimeout(500); + + await expect(page.locator('.lizmapPopupContent > .lizmapPopupSingleFeature .lizmapPopupTitle').first()).toHaveText("father_layer"); + + let firstPointElements = page.locator(".container.popup_lizmap_dd .before-tabs p b"); + await expect(firstPointElements).toHaveCount(3); + + await expect(firstPointElements.nth(0)).toHaveText("fid"); + await expect(firstPointElements.nth(1)).toHaveText("ref_id"); + await expect(firstPointElements.nth(2)).toHaveText("description"); + + + let firstElementsValues = page.locator(".container.popup_lizmap_dd .before-tabs div.field"); + await expect(firstElementsValues).toHaveCount(3); + await expect(firstElementsValues.nth(0)).toHaveText("3"); + await expect(firstElementsValues.nth(1)).toHaveText("1"); + await expect(firstElementsValues.nth(2)).toHaveText("Father 1"); + + //check childrens + let firstChildrendElements = page.locator('.lizmapPopupSingleFeature .lizmapPopupChildren .lizmapPopupSingleFeature'); + await expect(firstChildrendElements).toHaveCount(2); + + let firstElementfirstChildRows = firstChildrendElements.nth(0).getByRole('table').locator('tbody tr'); + await expect(firstElementfirstChildRows).toHaveCount(3); + await expect(firstElementfirstChildRows.nth(0).locator("td")).toHaveText("2"); + await expect(firstElementfirstChildRows.nth(1).locator("td")).toHaveText("1"); + await expect(firstElementfirstChildRows.nth(2).locator("td")).toHaveText("Child 2"); + let firstElementSecondChildRow = firstChildrendElements.nth(1).getByRole('table').locator('tbody tr'); + await expect(firstElementSecondChildRow.nth(0).locator("td")).toHaveText("1"); + await expect(firstElementSecondChildRow.nth(1).locator("td")).toHaveText("1"); + await expect(firstElementSecondChildRow.nth(2).locator("td")).toHaveText("Child 1"); + + //clear screen + await page.locator('#dock-close').click(); + + //second point + await page.locator('#OpenLayers_Layer_Vector_45 canvas').click({ + position: { + x: 392, + y: 257 + } + }); + await getFeatureInfoRequestPromise; + + //time for rendering the popup + await page.waitForTimeout(500); + + await expect(page.locator('.lizmapPopupContent > .lizmapPopupSingleFeature .lizmapPopupTitle').first()).toHaveText("father_layer"); + + let elements = page.locator(".container.popup_lizmap_dd .before-tabs p b"); + await expect(elements).toHaveCount(3); + + await expect(elements.nth(0)).toHaveText("fid"); + await expect(elements.nth(1)).toHaveText("ref_id"); + await expect(elements.nth(2)).toHaveText("description"); + + + let elementsValues = page.locator(".container.popup_lizmap_dd .before-tabs div.field"); + await expect(elementsValues).toHaveCount(3); + await expect(elementsValues.nth(0)).toHaveText("4"); + await expect(elementsValues.nth(1)).toHaveText("2"); + await expect(elementsValues.nth(2)).toHaveText("Father 2"); + + //check childrens + let childrendElements = page.locator('.lizmapPopupSingleFeature .lizmapPopupChildren .lizmapPopupSingleFeature'); + await expect(childrendElements).toHaveCount(2); + + let firstChildRows = childrendElements.nth(0).getByRole('table').locator('tbody tr'); + await expect(firstChildRows).toHaveCount(3); + await expect(firstChildRows.nth(0).locator("td")).toHaveText("4"); + await expect(firstChildRows.nth(1).locator("td")).toHaveText("2"); + await expect(firstChildRows.nth(2).locator("td")).toHaveText("Child 4"); + let secondChildRow = childrendElements.nth(1).getByRole('table').locator('tbody tr'); + await expect(secondChildRow.nth(0).locator("td")).toHaveText("3"); + await expect(secondChildRow.nth(1).locator("td")).toHaveText("2"); + await expect(secondChildRow.nth(2).locator("td")).toHaveText("Child 3"); + }); +}) diff --git a/tests/qgis-projects/tests/relations_project.qgs b/tests/qgis-projects/tests/relations_project.qgs new file mode 100644 index 0000000000..a5d45a7909 --- /dev/null +++ b/tests/qgis-projects/tests/relations_project.qgs @@ -0,0 +1,1371 @@ + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + + + + + + + + + + + + + + + + degrees + + -1.19953051643192499 + -0.93661971830985924 + 0.80046948356807501 + 1.06338028169014076 + + 0 + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + 0 + + + + + + + + + + + + + + Annotations_53e21d2e_6eb9_423b_ad44_901f0e23a8dd + + + + + Annotations + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + + -0.83625733852386497 + -0.298245638608932 + 0.35204678773879999 + 0.37076029181480402 + + + -0.83625733852386497 + -0.298245638608932 + 0.35204678773879999 + 0.37076029181480402 + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + ./test_embed.gpkg|layername=child_layer + child_layer + + + + child_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + ogr + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "description" + + + + + -0.63040935993194602 + 0.0994151905179024 + -0.251461982727051 + 0.36140355467796298 + + + -0.63040935993194602 + 0.0994151905179024 + -0.251461982727051 + 0.36140355467796298 + + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + ./test_embed.gpkg|layername=father_layer + father_layer + + + + father_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + ogr + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "fid" + + + + + + + + + + 0 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + EPSG:7030 + + + m2 + meters + + + 5 + 2.5 + false + false + 1 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + + false + + 1 + + + + lizmap_repository + lizmap_user + lizmap_user_groups + + + intranet + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + 8 + 8 + + + + + + + + None + false + + + + + + + EPSG:4326 + + 1 + + -1.48591549300000003 + -0.93661971799999999 + 1.08685446000000008 + 1.06338028200000001 + + false + conditions unknown + 90 + + + + 1 + + 8 + relations_project + false + + true + relations_project + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + riccardo + 2023-07-04T10:05:46 + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + diff --git a/tests/qgis-projects/tests/relations_project.qgs.cfg b/tests/qgis-projects/tests/relations_project.qgs.cfg new file mode 100644 index 0000000000..192db7014d --- /dev/null +++ b/tests/qgis-projects/tests/relations_project.qgs.cfg @@ -0,0 +1,166 @@ +{ + "metadata": { + "qgis_desktop_version": 32807, + "lizmap_plugin_version_str": "3.17.0", + "lizmap_plugin_version": 31700, + "lizmap_web_client_target_version": 30700, + "lizmap_web_client_target_status": "Dev", + "instance_target_url": "http://localhost:8130/", + "instance_target_repository": "intranet", + "project_valid": true + }, + "warnings": [], + "options": { + "projection": { + "proj4": "+proj=longlat +datum=WGS84 +no_defs", + "ref": "EPSG:4326" + }, + "bbox": [ + "-1.48591549300000003", + "-0.93661971799999999", + "1.08685446000000008", + "1.06338028200000001" + ], + "mapScales": [ + 10000, + 25000, + 50000, + 100000, + 250000, + 500000 + ], + "minScale": 1, + "maxScale": 1000000000, + "initialExtent": [ + -1.485915493, + -0.936619718, + 1.08685446, + 1.063380282 + ], + "popupLocation": "dock", + "pointTolerance": 25, + "lineTolerance": 10, + "polygonTolerance": 5, + "tmTimeFrameSize": 10, + "tmTimeFrameType": "seconds", + "tmAnimationFrameLength": 1000, + "datavizLocation": "dock", + "theme": "dark", + "fixed_scale_overview_map": true, + "dataviz_drag_drop": [] + }, + "layers": { + "child_layer": { + "id": "child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00", + "name": "child_layer", + "type": "layer", + "geometryType": "point", + "extent": [ + -0.836257338523865, + -0.298245638608932, + 0.3520467877388, + 0.370760291814804 + ], + "crs": "EPSG:4326", + "title": "child_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "form", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "father_layer": { + "id": "father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff", + "name": "father_layer", + "type": "layer", + "geometryType": "point", + "extent": [ + -0.630409359931946, + 0.0994151905179024, + -0.251461982727051, + 0.361403554677963 + ], + "crs": "EPSG:4326", + "title": "father_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "form", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "True", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + } + }, + "atlas": { + "layers": [] + }, + "locateByLayer": {}, + "attributeLayers": { + "father_layer": { + "layerId": "father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff", + "primaryKey": "fid", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 0 + }, + "child_layer": { + "layerId": "child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00", + "primaryKey": "fid", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 1 + } + }, + "tooltipLayers": {}, + "editionLayers": {}, + "layouts": { + "config": { + "default_popup_print": false + }, + "list": [] + }, + "loginFilteredLayers": {}, + "timemanagerLayers": {}, + "datavizLayers": {}, + "filter_by_polygon": { + "config": { + "polygon_layer_id": null, + "group_field": "", + "filter_by_user": false + }, + "layers": [] + }, + "formFilterLayers": {} +} diff --git a/tests/qgis-projects/tests/relations_project_embed.qgs b/tests/qgis-projects/tests/relations_project_embed.qgs new file mode 100644 index 0000000000..c16fb1ff62 --- /dev/null +++ b/tests/qgis-projects/tests/relations_project_embed.qgs @@ -0,0 +1,388 @@ + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + + + + + + + + + + + + + + degrees + + -1.25007169798646167 + -0.62017303629660181 + 1.24536696716513484 + 0.78473941759324384 + + 0 + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + 0 + + + + + + + + + + + + + + Annotations_53e21d2e_6eb9_423b_ad44_901f0e23a8dd + + + + + Annotations + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + + + + + + + + + 0 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + EPSG:7030 + + + m2 + meters + + + 5 + 2.5 + false + false + 1 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + + false + + 1 + + + + lizmap_repository + lizmap_user + lizmap_user_groups + + + intranet + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + 8 + 8 + + + + + + + + None + false + + + + + + + EPSG:4326 + + 1 + + -1.48591549300000003 + -0.93661971799999999 + 1.08685446000000008 + 1.06338028200000001 + + false + conditions unknown + 90 + + + + 1 + + 8 + relations_project_embed + false + + true + relations_project_embed + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + riccardo + 2023-07-04T10:29:04 + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + diff --git a/tests/qgis-projects/tests/relations_project_embed.qgs.cfg b/tests/qgis-projects/tests/relations_project_embed.qgs.cfg new file mode 100644 index 0000000000..463e1487ac --- /dev/null +++ b/tests/qgis-projects/tests/relations_project_embed.qgs.cfg @@ -0,0 +1,166 @@ +{ + "metadata": { + "qgis_desktop_version": 32807, + "lizmap_plugin_version_str": "3.17.0", + "lizmap_plugin_version": 31700, + "lizmap_web_client_target_version": 30700, + "lizmap_web_client_target_status": "Dev", + "instance_target_url": "http://localhost:8130/", + "instance_target_repository": "intranet", + "project_valid": true + }, + "warnings": [], + "options": { + "projection": { + "proj4": "+proj=longlat +datum=WGS84 +no_defs", + "ref": "EPSG:4326" + }, + "bbox": [ + "-1.48591549300000003", + "-0.93661971799999999", + "1.08685446000000008", + "1.06338028200000001" + ], + "mapScales": [ + 10000, + 25000, + 50000, + 100000, + 250000, + 500000 + ], + "minScale": 1, + "maxScale": 1000000000, + "initialExtent": [ + -1.485915493, + -0.936619718, + 1.08685446, + 1.063380282 + ], + "popupLocation": "dock", + "pointTolerance": 25, + "lineTolerance": 10, + "polygonTolerance": 5, + "tmTimeFrameSize": 10, + "tmTimeFrameType": "seconds", + "tmAnimationFrameLength": 1000, + "datavizLocation": "dock", + "theme": "dark", + "fixed_scale_overview_map": true, + "dataviz_drag_drop": [] + }, + "layers": { + "father_layer": { + "id": "father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff", + "name": "father_layer", + "type": "layer", + "geometryType": "point", + "extent": [ + -0.630409359931946, + 0.0994151905179024, + -0.251461982727051, + 0.361403554677963 + ], + "crs": "EPSG:4326", + "title": "father_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "form", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "True", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "child_layer": { + "id": "child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00", + "name": "child_layer", + "type": "layer", + "geometryType": "point", + "extent": [ + -0.836257338523865, + -0.298245638608932, + 0.3520467877388, + 0.370760291814804 + ], + "crs": "EPSG:4326", + "title": "child_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "True", + "popupSource": "form", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "legend_image_option": "hide_at_startup", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + } + }, + "atlas": { + "layers": [] + }, + "locateByLayer": {}, + "attributeLayers": { + "father_layer": { + "layerId": "father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff", + "primaryKey": "fid", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 0 + }, + "child_layer": { + "layerId": "child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00", + "primaryKey": "fid", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 1 + } + }, + "tooltipLayers": {}, + "editionLayers": {}, + "layouts": { + "config": { + "default_popup_print": false + }, + "list": [] + }, + "loginFilteredLayers": {}, + "timemanagerLayers": {}, + "datavizLayers": {}, + "filter_by_polygon": { + "config": { + "polygon_layer_id": null, + "group_field": "", + "filter_by_user": false + }, + "layers": [] + }, + "formFilterLayers": {} +} diff --git a/tests/qgis-projects/tests/test_embed.gpkg b/tests/qgis-projects/tests/test_embed.gpkg new file mode 100644 index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V%czxNMHKSX_-tWvi(gvllOgYzOmuZb$>zRy9B$d&SxTmh&8}!BB2P+5C%emUka~M`)UyK+^`e)qhgu z_d=>_eqOeGwe#~DUC$Wtb+2-_h+j4C<;-o;u!f~wgR+HXn&(}+_1vmIp<2op4p&iO k+K9jwp_cm6QXAD}U@G0f^R8L7dQ_a3@93U&Ki9+m1M&A^2mk;8 literal 0 HcmV?d00001 diff --git a/tests/units/classes/Project/QgisProjectTest.php b/tests/units/classes/Project/QgisProjectTest.php index f8b9a2f110..40210da994 100644 --- a/tests/units/classes/Project/QgisProjectTest.php +++ b/tests/units/classes/Project/QgisProjectTest.php @@ -277,6 +277,65 @@ public function testReadRelations() $this->assertEquals($expectedFields, $relationsFields); } + public function testEmbeddedRelation() + { + $file = __DIR__.'/Ressources/relations_project_embed.qgs'; + $testQgis = new qgisProjectForTests(); + $testQgis->setPath($file); + $testQgis->readXMLProjectTest($file); + + //check layers + foreach ($testQgis->getLayers() as $layers){ + $this->assertEquals($layers["embedded"],1); + $this->assertEquals($layers["projectPath"],'./relations_project.qgs'); + } + + //check relation on embedded project + $expectedRelationsOnEmbeddedLayers = array( + 'father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff' => array( + array('referencingLayer' => 'child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00', + 'referencedField' => 'ref_id', + 'referencingField' => 'father_id', + 'previewField'=>'fid', + 'relationName' => 'fk_father_child_relation', + 'relationId' => 'child_laye_father_id_father_lay_ref_id_1', + + ), + ), + 'pivot' => array(), + ); + + $expectedFieldsOnEmbeddedLayers = array( + array ( + 'id' => 'child_laye_father_id_father_lay_ref_id_1', + 'layerName' => 'father_layer', + 'typeName' => 'father_layer', + 'propertyName' => 'ref_id,fid', + 'filterExpression' => '', + 'referencedField' => 'ref_id', + 'referencingField' => 'father_id', + 'previewField' => 'fid', + ) + ); + + $relations = $testQgis->getRelations(); + $relationFields = $testQgis->getRelationsFields(); + $this->assertEquals($expectedRelationsOnEmbeddedLayers, $relations); + $this->assertEquals($expectedFieldsOnEmbeddedLayers, $relationFields); + + // check relations identity on main project + $file = __DIR__.'/Ressources/relations_project.qgs'; + $testQgisParent = new qgisProjectForTests(); + $testQgisParent->setPath($file); + $testQgisParent->readXMLProjectTest($file); + + $parentRelations = $testQgisParent->getRelations(); + $parentRelationFields = $testQgisParent->getRelationsFields(); + $this->assertEquals($relations,$parentRelations); + $this->assertEquals($relationFields,$parentRelationFields); + + } + public function testCacheConstruct() { $cachedProperties = array('WMSInformation', 'canvasColor', 'allProj4', diff --git a/tests/units/classes/Project/Ressources/relations_project.qgs b/tests/units/classes/Project/Ressources/relations_project.qgs new file mode 100644 index 0000000000..a5d45a7909 --- /dev/null +++ b/tests/units/classes/Project/Ressources/relations_project.qgs @@ -0,0 +1,1371 @@ + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + + + + + + + + + + + + + + + + degrees + + -1.19953051643192499 + -0.93661971830985924 + 0.80046948356807501 + 1.06338028169014076 + + 0 + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + 0 + + + + + + + + + + + + + + Annotations_53e21d2e_6eb9_423b_ad44_901f0e23a8dd + + + + + Annotations + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + + -0.83625733852386497 + -0.298245638608932 + 0.35204678773879999 + 0.37076029181480402 + + + -0.83625733852386497 + -0.298245638608932 + 0.35204678773879999 + 0.37076029181480402 + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + ./test_embed.gpkg|layername=child_layer + child_layer + + + + child_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + ogr + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "description" + + + + + -0.63040935993194602 + 0.0994151905179024 + -0.251461982727051 + 0.36140355467796298 + + + -0.63040935993194602 + 0.0994151905179024 + -0.251461982727051 + 0.36140355467796298 + + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + ./test_embed.gpkg|layername=father_layer + father_layer + + + + father_layer + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + ogr + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "fid" + + + + + + + + + + 0 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + EPSG:7030 + + + m2 + meters + + + 5 + 2.5 + false + false + 1 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + + false + + 1 + + + + lizmap_repository + lizmap_user + lizmap_user_groups + + + intranet + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + 8 + 8 + + + + + + + + None + false + + + + + + + EPSG:4326 + + 1 + + -1.48591549300000003 + -0.93661971799999999 + 1.08685446000000008 + 1.06338028200000001 + + false + conditions unknown + 90 + + + + 1 + + 8 + relations_project + false + + true + relations_project + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + riccardo + 2023-07-04T10:05:46 + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + diff --git a/tests/units/classes/Project/Ressources/relations_project_embed.qgs b/tests/units/classes/Project/Ressources/relations_project_embed.qgs new file mode 100644 index 0000000000..c16fb1ff62 --- /dev/null +++ b/tests/units/classes/Project/Ressources/relations_project_embed.qgs @@ -0,0 +1,388 @@ + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + + + + + + + + + + + + + + degrees + + -1.25007169798646167 + -0.62017303629660181 + 1.24536696716513484 + 0.78473941759324384 + + 0 + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + 0 + + + + + + + + + + + + + + Annotations_53e21d2e_6eb9_423b_ad44_901f0e23a8dd + + + + + Annotations + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + + + + + + + + + 0 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + EPSG:7030 + + + m2 + meters + + + 5 + 2.5 + false + false + 1 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + + false + + 1 + + + + lizmap_repository + lizmap_user + lizmap_user_groups + + + intranet + + + + + + + + child_layer_8dec6d75_eeed_494b_b97f_5f2c7e16fd00 + father_layer_79f5a996_39db_4a1f_b270_dfe21d3e44ff + + + 8 + 8 + + + + + + + + None + false + + + + + + + EPSG:4326 + + 1 + + -1.48591549300000003 + -0.93661971799999999 + 1.08685446000000008 + 1.06338028200000001 + + false + conditions unknown + 90 + + + + 1 + + 8 + relations_project_embed + false + + true + relations_project_embed + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + riccardo + 2023-07-04T10:29:04 + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + diff --git a/tests/units/testslib/QgisProjectForTests.php b/tests/units/testslib/QgisProjectForTests.php index a2072283fa..70f4a45fb2 100644 --- a/tests/units/testslib/QgisProjectForTests.php +++ b/tests/units/testslib/QgisProjectForTests.php @@ -11,6 +11,23 @@ public function __construct($data = null) } } + public function readXMLProjectTest($file) + { + return $this->readXMLProject($file); + } + + public function getLayers() + { + return $this->layers; + } + public function getRelations() + { + return $this->relations; + } + public function getRelationsFields() + { + return $this->relationsFields; + } public function readWMSInfoTest($xml) { return $this->readWMSInformation($xml); @@ -70,6 +87,12 @@ public function setXml($xml) $this->xml = $xml; } + + public function setPath($path) + { + $this->path = $path; + } + public function setLayers($layers) { $this->layers = $layers;