diff --git a/tests/Fixtures/TagManagerFixture.php b/tests/Fixtures/TagManagerFixture.php index 68e2dccfc..1fda4643a 100644 --- a/tests/Fixtures/TagManagerFixture.php +++ b/tests/Fixtures/TagManagerFixture.php @@ -47,6 +47,8 @@ class TagManagerFixture extends Fixture public $idContainer4DraftVersion = 4; public $idContainer5 = 'aaacont5'; public $idContainer5DraftVersion = 5; + public $idContainer6 = 'aaacont6'; + public $idContainer6DraftVersion = 6; /** * @var API @@ -103,6 +105,10 @@ public function setUpContainers() $idContainer5DraftVersion = $this->getContainerDraftVersion($this->idSite4, $this->idContainer5); self::assertSame($this->idContainer5DraftVersion, $idContainer5DraftVersion); + $this->addContainer($this->idSite4, $this->idContainer6, 'Container6', 'My container 6 description', null, 1); + $idContainer6DraftVersion = $this->getContainerDraftVersion($this->idSite4, $this->idContainer6); + self::assertSame($this->idContainer6DraftVersion, $idContainer6DraftVersion); + $this->api->createContainerVersion($this->idSite2, $this->idContainer2, 'container2_v1', 'Version from draft without content'); $idTrigger1Container1 = $this->addContainerTrigger($this->idSite2, $this->idContainer1, $this->idContainer1DraftVersion, null, 'My trigger1', array('eventName' => 'foo'), array(), 'My trigger1 description'); @@ -142,7 +148,7 @@ public function setUpContainers() } } - public function addContainer($idSite, $idContainer, $name = 'My Name', $description = '', $context = null) + public function addContainer($idSite, $idContainer, $name = 'My Name', $description = '', $context = null, $ignoreGtmDataLayer = 0) { $this->initIfNeeded(); if (!isset($context)) { @@ -154,7 +160,7 @@ public function addContainer($idSite, $idContainer, $name = 'My Name', $descript 'containerIdGenerator' => new StaticContainerIdGenerator($idContainer) )); - return $container->addContainer($idSite, $context, $name, $description); + return $container->addContainer($idSite, $context, $name, $description, $ignoreGtmDataLayer); } public function updateContainer($idSite, $idContainer, $name = 'Updated Name', $description = '') diff --git a/tests/System/APITest.php b/tests/System/APITest.php index 1004241da..21357dd89 100644 --- a/tests/System/APITest.php +++ b/tests/System/APITest.php @@ -99,6 +99,11 @@ public function getExportApiForTesting() 'idContainer' => self::$fixture->idContainer2, 'idContainerVersion' => self::$fixture->idContainer2DraftVersion), 'container2_empty_container'), + array( + array('idSite' => self::$fixture->idSite4, + 'idContainer' => self::$fixture->idContainer6, + 'idContainerVersion' => self::$fixture->idContainer6DraftVersion), + 'container6_v1'), ); } diff --git a/tests/System/expected/test___TagManager.exportContainerVersion_import_overwrite_itself.xml b/tests/System/expected/test___TagManager.exportContainerVersion_import_overwrite_itself.xml index 695f473ac..541daae0d 100644 --- a/tests/System/expected/test___TagManager.exportContainerVersion_import_overwrite_itself.xml +++ b/tests/System/expected/test___TagManager.exportContainerVersion_import_overwrite_itself.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_after_import_into_draft.xml b/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_after_import_into_draft.xml index af0263810..4a20f2d1a 100644 --- a/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_after_import_into_draft.xml +++ b/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_after_import_into_draft.xml @@ -5,6 +5,7 @@ web My Name + 0 diff --git a/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_before_import_into_draft.xml b/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_before_import_into_draft.xml index d46fcc81b..96c2d0dc8 100644 --- a/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_before_import_into_draft.xml +++ b/tests/System/expected/test___TagManager.exportContainerVersion_import_with_backupname_before_import_into_draft.xml @@ -5,6 +5,7 @@ web My Name + 0 diff --git a/tests/System/expected/test___TagManager.exportContainerVersion_import_without_backupname_after_import_into_draft.xml b/tests/System/expected/test___TagManager.exportContainerVersion_import_without_backupname_after_import_into_draft.xml index 160bb8c9c..fecac8eb2 100644 --- a/tests/System/expected/test___TagManager.exportContainerVersion_import_without_backupname_after_import_into_draft.xml +++ b/tests/System/expected/test___TagManager.exportContainerVersion_import_without_backupname_after_import_into_draft.xml @@ -5,6 +5,7 @@ web My Name + 0 diff --git a/tests/System/expected/test___TagManager.exportContainerVersion_site_default_container.xml b/tests/System/expected/test___TagManager.exportContainerVersion_site_default_container.xml index 99f741ff3..49998f343 100644 --- a/tests/System/expected/test___TagManager.exportContainerVersion_site_default_container.xml +++ b/tests/System/expected/test___TagManager.exportContainerVersion_site_default_container.xml @@ -5,6 +5,7 @@ web Default Container This container was auto generated when the website was created. + 0 diff --git a/tests/System/expected/test___TagManager.getContainer_import_overwrite_itself.xml b/tests/System/expected/test___TagManager.getContainer_import_overwrite_itself.xml index 126534252..a27c19446 100644 --- a/tests/System/expected/test___TagManager.getContainer_import_overwrite_itself.xml +++ b/tests/System/expected/test___TagManager.getContainer_import_overwrite_itself.xml @@ -5,6 +5,7 @@ web Container1 + 0 active @@ -12,7 +13,7 @@ - 11 + 12 aaacont1 2 active @@ -28,7 +29,7 @@ - 10 + 11 aaacont1 2 active @@ -45,7 +46,7 @@ - 9 + 10 aaacont1 2 active @@ -60,7 +61,7 @@ - 8 + 9 aaacont1 2 active @@ -75,7 +76,7 @@ - 7 + 8 aaacont1 2 active @@ -94,7 +95,7 @@ 1 aaacont1 - 10 + 11 2 active live @@ -106,7 +107,7 @@ 2 aaacont1 - 10 + 11 2 active dev @@ -118,7 +119,7 @@ 3 aaacont1 - 11 + 12 2 active staging diff --git a/tests/System/expected/test___TagManager.getContainer_import_with_backupname_after_import_into_draft.xml b/tests/System/expected/test___TagManager.getContainer_import_with_backupname_after_import_into_draft.xml index cb28e58da..42e287bd1 100644 --- a/tests/System/expected/test___TagManager.getContainer_import_with_backupname_after_import_into_draft.xml +++ b/tests/System/expected/test___TagManager.getContainer_import_with_backupname_after_import_into_draft.xml @@ -5,6 +5,7 @@ web My Name + 0 active @@ -12,7 +13,7 @@ - 13 + 14 import01 5 active @@ -30,7 +31,7 @@ - 12 + 13 import01 5 active diff --git a/tests/System/expected/test___TagManager.getContainer_import_without_backupname_after_import_into_draft.xml b/tests/System/expected/test___TagManager.getContainer_import_without_backupname_after_import_into_draft.xml index 84ef43e1e..1e85bee6f 100644 --- a/tests/System/expected/test___TagManager.getContainer_import_without_backupname_after_import_into_draft.xml +++ b/tests/System/expected/test___TagManager.getContainer_import_without_backupname_after_import_into_draft.xml @@ -5,6 +5,7 @@ web My Name + 0 active @@ -15,7 +16,7 @@ - 14 + 15 import02 4 active diff --git a/tests/System/expected/test__container1_draft_detected_automatically__TagManager.exportContainerVersion_2_aaacont1_container1_draft_detected_automatically.xml b/tests/System/expected/test__container1_draft_detected_automatically__TagManager.exportContainerVersion_2_aaacont1_container1_draft_detected_automatically.xml index 7a83bfccb..ae399a2fa 100644 --- a/tests/System/expected/test__container1_draft_detected_automatically__TagManager.exportContainerVersion_2_aaacont1_container1_draft_detected_automatically.xml +++ b/tests/System/expected/test__container1_draft_detected_automatically__TagManager.exportContainerVersion_2_aaacont1_container1_draft_detected_automatically.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_draft_version__TagManager.exportContainerVersion_2_aaacont1_1_container1_draft_version.xml b/tests/System/expected/test__container1_draft_version__TagManager.exportContainerVersion_2_aaacont1_1_container1_draft_version.xml index 7a83bfccb..ae399a2fa 100644 --- a/tests/System/expected/test__container1_draft_version__TagManager.exportContainerVersion_2_aaacont1_1_container1_draft_version.xml +++ b/tests/System/expected/test__container1_draft_version__TagManager.exportContainerVersion_2_aaacont1_1_container1_draft_version.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_v1__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version1_container1_v1.xml b/tests/System/expected/test__container1_v1__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version1_container1_v1.xml index 2afd35cde..c042eaa82 100644 --- a/tests/System/expected/test__container1_v1__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version1_container1_v1.xml +++ b/tests/System/expected/test__container1_v1__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version1_container1_v1.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_v2__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version2_container1_v2.xml b/tests/System/expected/test__container1_v2__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version2_container1_v2.xml index 8691716e6..07a8aaa7d 100644 --- a/tests/System/expected/test__container1_v2__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version2_container1_v2.xml +++ b/tests/System/expected/test__container1_v2__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version2_container1_v2.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_v3__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version3_container1_v3.xml b/tests/System/expected/test__container1_v3__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version3_container1_v3.xml index 8d259692f..778bd9637 100644 --- a/tests/System/expected/test__container1_v3__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version3_container1_v3.xml +++ b/tests/System/expected/test__container1_v3__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version3_container1_v3.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_v4__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version4_container1_v4.xml b/tests/System/expected/test__container1_v4__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version4_container1_v4.xml index 3614c294b..7b6db5c21 100644 --- a/tests/System/expected/test__container1_v4__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version4_container1_v4.xml +++ b/tests/System/expected/test__container1_v4__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version4_container1_v4.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container1_v5__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version5_container1_v5.xml b/tests/System/expected/test__container1_v5__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version5_container1_v5.xml index 5f97d9868..d745d98bb 100644 --- a/tests/System/expected/test__container1_v5__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version5_container1_v5.xml +++ b/tests/System/expected/test__container1_v5__TagManager.exportContainerVersion_2_aaacont1_idContainer1Version5_container1_v5.xml @@ -5,6 +5,7 @@ web Container1 + 0 diff --git a/tests/System/expected/test__container2_empty_container__TagManager.exportContainerVersion_2_aaacont2_2_container2_empty_container.xml b/tests/System/expected/test__container2_empty_container__TagManager.exportContainerVersion_2_aaacont2_2_container2_empty_container.xml index bc4a291a1..190a6fb08 100644 --- a/tests/System/expected/test__container2_empty_container__TagManager.exportContainerVersion_2_aaacont2_2_container2_empty_container.xml +++ b/tests/System/expected/test__container2_empty_container__TagManager.exportContainerVersion_2_aaacont2_2_container2_empty_container.xml @@ -5,6 +5,7 @@ web Container2 My container 2 description + 0 diff --git a/tests/System/expected/test__container6_v1__TagManager.exportContainerVersion_4_aaacont6_6_container6_v1.xml b/tests/System/expected/test__container6_v1__TagManager.exportContainerVersion_4_aaacont6_6_container6_v1.xml new file mode 100644 index 000000000..e34678f91 --- /dev/null +++ b/tests/System/expected/test__container6_v1__TagManager.exportContainerVersion_4_aaacont6_6_container6_v1.xml @@ -0,0 +1,29 @@ + + + aaacont6 + 4 + web + Container6 + My container 6 description + 1 + + + + + 0 + + + + 0 + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/System/expected/test_empty_no_changes__TagManager.getContainer.xml b/tests/System/expected/test_empty_no_changes__TagManager.getContainer.xml index 0f75657e2..d89ffc8e7 100644 --- a/tests/System/expected/test_empty_no_changes__TagManager.getContainer.xml +++ b/tests/System/expected/test_empty_no_changes__TagManager.getContainer.xml @@ -5,6 +5,7 @@ web Container3 My container 3 description + 0 active diff --git a/tests/System/expected/test_only_one_version__TagManager.getContainer.xml b/tests/System/expected/test_only_one_version__TagManager.getContainer.xml index 15401ddcc..e0edaea77 100644 --- a/tests/System/expected/test_only_one_version__TagManager.getContainer.xml +++ b/tests/System/expected/test_only_one_version__TagManager.getContainer.xml @@ -5,6 +5,7 @@ web Container2 My container 2 description + 0 active @@ -12,7 +13,7 @@ - 6 + 7 aaacont2 2 active diff --git a/tests/System/expected/test_only_one_version__TagManager.getContainerVersions.xml b/tests/System/expected/test_only_one_version__TagManager.getContainerVersions.xml index 196954854..90bb334bf 100644 --- a/tests/System/expected/test_only_one_version__TagManager.getContainerVersions.xml +++ b/tests/System/expected/test_only_one_version__TagManager.getContainerVersions.xml @@ -1,7 +1,7 @@ - 6 + 7 aaacont2 2 active diff --git a/tests/System/expected/test_with_containers__TagManager.getContainers.xml b/tests/System/expected/test_with_containers__TagManager.getContainers.xml index 5302a2c4f..75e9a125c 100644 --- a/tests/System/expected/test_with_containers__TagManager.getContainers.xml +++ b/tests/System/expected/test_with_containers__TagManager.getContainers.xml @@ -6,6 +6,7 @@ web Container1 + 0 active @@ -13,7 +14,7 @@ - 11 + 12 aaacont1 2 active @@ -29,7 +30,7 @@ - 10 + 11 aaacont1 2 active @@ -46,7 +47,7 @@ - 9 + 10 aaacont1 2 active @@ -61,7 +62,7 @@ - 8 + 9 aaacont1 2 active @@ -76,7 +77,7 @@ - 7 + 8 aaacont1 2 active @@ -95,7 +96,7 @@ 1 aaacont1 - 10 + 11 2 active live @@ -107,7 +108,7 @@ 2 aaacont1 - 10 + 11 2 active dev @@ -119,7 +120,7 @@ 3 aaacont1 - 11 + 12 2 active staging @@ -161,6 +162,7 @@ web Container2 My container 2 description + 0 active @@ -168,7 +170,7 @@ - 6 + 7 aaacont2 2 active @@ -205,6 +207,7 @@ web Container3 My container 3 description + 0 active diff --git a/tests/System/expected/test_with_versions_and_releases__TagManager.getContainer.xml b/tests/System/expected/test_with_versions_and_releases__TagManager.getContainer.xml index 126534252..a27c19446 100644 --- a/tests/System/expected/test_with_versions_and_releases__TagManager.getContainer.xml +++ b/tests/System/expected/test_with_versions_and_releases__TagManager.getContainer.xml @@ -5,6 +5,7 @@ web Container1 + 0 active @@ -12,7 +13,7 @@ - 11 + 12 aaacont1 2 active @@ -28,7 +29,7 @@ - 10 + 11 aaacont1 2 active @@ -45,7 +46,7 @@ - 9 + 10 aaacont1 2 active @@ -60,7 +61,7 @@ - 8 + 9 aaacont1 2 active @@ -75,7 +76,7 @@ - 7 + 8 aaacont1 2 active @@ -94,7 +95,7 @@ 1 aaacont1 - 10 + 11 2 active live @@ -106,7 +107,7 @@ 2 aaacont1 - 10 + 11 2 active dev @@ -118,7 +119,7 @@ 3 aaacont1 - 11 + 12 2 active staging diff --git a/tests/System/expected/test_with_versions_and_releases__TagManager.getContainerVersions.xml b/tests/System/expected/test_with_versions_and_releases__TagManager.getContainerVersions.xml index c9d15d21c..452294f11 100644 --- a/tests/System/expected/test_with_versions_and_releases__TagManager.getContainerVersions.xml +++ b/tests/System/expected/test_with_versions_and_releases__TagManager.getContainerVersions.xml @@ -1,7 +1,7 @@ - 11 + 12 aaacont1 2 active @@ -16,7 +16,7 @@ 3 aaacont1 - 11 + 12 2 active staging @@ -27,7 +27,7 @@ - 10 + 11 aaacont1 2 active @@ -42,7 +42,7 @@ 1 aaacont1 - 10 + 11 2 active live @@ -53,7 +53,7 @@ 2 aaacont1 - 10 + 11 2 active dev @@ -64,7 +64,7 @@ - 9 + 10 aaacont1 2 active @@ -79,7 +79,7 @@ - 8 + 9 aaacont1 2 active @@ -94,7 +94,7 @@ - 7 + 8 aaacont1 2 active