Skip to content

Commit

Permalink
Fixing tests after changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Nov 3, 2023
1 parent be46f9b commit 9c3c095
Show file tree
Hide file tree
Showing 25 changed files with 102 additions and 40 deletions.
10 changes: 8 additions & 2 deletions tests/Fixtures/TagManagerFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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)) {
Expand All @@ -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 = '')
Expand Down
5 changes: 5 additions & 0 deletions tests/System/APITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>My Name</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>My Name</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>My Name</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Default Container</name>
<description>This container was auto generated when the website was created.</description>
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>
<status>active</status>




<versions>
<row>
<idcontainerversion>11</idcontainerversion>
<idcontainerversion>12</idcontainerversion>
<idcontainer>aaacont1</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand All @@ -28,7 +29,7 @@
</environments>
</row>
<row>
<idcontainerversion>10</idcontainerversion>
<idcontainerversion>11</idcontainerversion>
<idcontainer>aaacont1</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand All @@ -45,7 +46,7 @@
</environments>
</row>
<row>
<idcontainerversion>9</idcontainerversion>
<idcontainerversion>10</idcontainerversion>
<idcontainer>aaacont1</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand All @@ -60,7 +61,7 @@
</environments>
</row>
<row>
<idcontainerversion>8</idcontainerversion>
<idcontainerversion>9</idcontainerversion>
<idcontainer>aaacont1</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand All @@ -75,7 +76,7 @@
</environments>
</row>
<row>
<idcontainerversion>7</idcontainerversion>
<idcontainerversion>8</idcontainerversion>
<idcontainer>aaacont1</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand All @@ -94,7 +95,7 @@
<row>
<idcontainerrelease>1</idcontainerrelease>
<idcontainer>aaacont1</idcontainer>
<idcontainerversion>10</idcontainerversion>
<idcontainerversion>11</idcontainerversion>
<idsite>2</idsite>
<status>active</status>
<environment>live</environment>
Expand All @@ -106,7 +107,7 @@
<row>
<idcontainerrelease>2</idcontainerrelease>
<idcontainer>aaacont1</idcontainer>
<idcontainerversion>10</idcontainerversion>
<idcontainerversion>11</idcontainerversion>
<idsite>2</idsite>
<status>active</status>
<environment>dev</environment>
Expand All @@ -118,7 +119,7 @@
<row>
<idcontainerrelease>3</idcontainerrelease>
<idcontainer>aaacont1</idcontainer>
<idcontainerversion>11</idcontainerversion>
<idcontainerversion>12</idcontainerversion>
<idsite>2</idsite>
<status>active</status>
<environment>staging</environment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<context>web</context>
<name>My Name</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>
<status>active</status>




<versions>
<row>
<idcontainerversion>13</idcontainerversion>
<idcontainerversion>14</idcontainerversion>
<idcontainer>import01</idcontainer>
<idsite>5</idsite>
<status>active</status>
Expand All @@ -30,7 +31,7 @@
<releases>
</releases>
<draft>
<idcontainerversion>12</idcontainerversion>
<idcontainerversion>13</idcontainerversion>
<idcontainer>import01</idcontainer>
<idsite>5</idsite>
<status>active</status>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>My Name</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>
<status>active</status>


Expand All @@ -15,7 +16,7 @@
<releases>
</releases>
<draft>
<idcontainerversion>14</idcontainerversion>
<idcontainerversion>15</idcontainerversion>
<idcontainer>import02</idcontainer>
<idsite>4</idsite>
<status>active</status>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container1</name>
<description />
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container2</name>
<description>My container 2 description</description>
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<idcontainer>aaacont6</idcontainer>
<idsite>4</idsite>
<context>web</context>
<name>Container6</name>
<description>My container 6 description</description>
<ignoreGtmDataLayer>1</ignoreGtmDataLayer>




<revision>0</revision>
<version>
<name />
<description />
<revision>0</revision>




</version>
<tags>
</tags>
<triggers>
</triggers>
<variables>
</variables>
</result>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<context>web</context>
<name>Container3</name>
<description>My container 3 description</description>
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>
<status>active</status>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<context>web</context>
<name>Container2</name>
<description>My container 2 description</description>
<ignoreGtmDataLayer>0</ignoreGtmDataLayer>
<status>active</status>




<versions>
<row>
<idcontainerversion>6</idcontainerversion>
<idcontainerversion>7</idcontainerversion>
<idcontainer>aaacont2</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>
<idcontainerversion>6</idcontainerversion>
<idcontainerversion>7</idcontainerversion>
<idcontainer>aaacont2</idcontainer>
<idsite>2</idsite>
<status>active</status>
Expand Down
Loading

0 comments on commit 9c3c095

Please sign in to comment.