Skip to content

Commit

Permalink
Refs #4828 Adding integration test replicating the SQL error
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Mar 26, 2014
1 parent 0bd88be commit b65ad76
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 11 deletions.
20 changes: 17 additions & 3 deletions tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php
Expand Up @@ -85,7 +85,8 @@ public function getApiForTesting()
),

// day tests
array($dayApi, array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('day'), 'otherRequestParameters' => array('_leavePiwikCoreVariables' => 1))),
array($dayApi, array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('day'),
'otherRequestParameters' => array('_leavePiwikCoreVariables' => 1))),

// goals API week tests
array($goalWeekApi, array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('week'))),
Expand Down Expand Up @@ -209,9 +210,22 @@ public function getApiForTesting()
'segment' => 'visitConvertedGoalId==666',
'testSuffix' => '_SegmentNoVisit_HaveConvertedNonExistingGoal')),


// test segment visitEcommerceStatus and visitConvertedGoalId
array($apiWithSegments_visitConvertedGoal,
array(
'idSite' => $idSite,
'date' => $dateTime,
'periods' => array('week'),
'segment' => 'visitEcommerceStatus!=ordered;visitConvertedGoalId==1',
'testSuffix' => '_SegmentVisitHasNotOrderedAndConvertedGoal')),


// test segment pageTitle
array('VisitsSummary.get', array('idSite' => $idSite, 'date' => $dateTime,
'periods' => array('day'), 'segment' => 'pageTitle==incredible title!',
array('VisitsSummary.get', array('idSite' => $idSite,
'date' => $dateTime,
'periods' => array('day'),
'segment' => 'pageTitle==incredible title!',
'testSuffix' => '_SegmentPageTitleMatch')),

// test Live! output is OK also for the visit that just bought something (other visits leave an abandoned cart)
Expand Down
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<error message="SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_conversion_item' in 'field list'
--&gt; To temporarily debug this error further, set const DISPLAY_BACKTRACE_DEBUG=true; in ResponseBuilder.php" />
</result>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<error message="SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_conversion_item' in 'field list'
--&gt; To temporarily debug this error further, set const DISPLAY_BACKTRACE_DEBUG=true; in ResponseBuilder.php" />
</result>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<error message="SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_conversion_item' in 'field list'
--&gt; To temporarily debug this error further, set const DISPLAY_BACKTRACE_DEBUG=true; in ResponseBuilder.php" />
</result>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<error message="SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_conversion_item' in 'field list'
--&gt; To temporarily debug this error further, set const DISPLAY_BACKTRACE_DEBUG=true; in ResponseBuilder.php" />
</result>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_visits>1</nb_visits>
<nb_actions>4</nb_actions>
<nb_visits_converted>1</nb_visits_converted>
<bounce_count>0</bounce_count>
<sum_visit_length>721</sum_visit_length>
<max_actions>4</max_actions>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>4</nb_actions_per_visit>
<avg_time_on_site>721</avg_time_on_site>
</result>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit b65ad76

Please sign in to comment.