diff --git a/tests/PHPUnit/Integration/SegmentTest.php b/tests/PHPUnit/Integration/SegmentTest.php index e1439cddda9..e0fd9cd3c44 100644 --- a/tests/PHPUnit/Integration/SegmentTest.php +++ b/tests/PHPUnit/Integration/SegmentTest.php @@ -36,11 +36,11 @@ public function tearDown() parent::tearDown(); } - protected function _filterWhitsSpaces($valueToFilter) + protected function _filterWhiteSpaces($valueToFilter) { if (is_array($valueToFilter)) { foreach ($valueToFilter as $key => $value) { - $valueToFilter[$key] = $this->_filterWhitsSpaces($value); + $valueToFilter[$key] = $this->_filterWhiteSpaces($value); } return $valueToFilter; } else { @@ -117,11 +117,11 @@ public function testCommon($segment, $expected) $segment = new Segment($segment, $idSites = array()); $sql = $segment->getSelectQuery($select, $from, false); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($sql)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($sql)); // calling twice should give same results $sql = $segment->getSelectQuery($select, array($from)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($sql)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($sql)); $this->assertEquals(32, strlen($segment->getHash())); } @@ -150,7 +150,7 @@ public function test_getSelectQuery_whenNoJoin() ( log_visit.custom_var_k1 = ? AND log_visit.visitor_returning = ? )", "bind" => array(1, 'Test', 0)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinVisitOnAction() @@ -178,7 +178,7 @@ public function test_getSelectQuery_whenJoinVisitOnAction() ( log_link_visit_action.custom_var_k1 = ? AND log_visit.visitor_returning = ? )", "bind" => array(1, 'Test', 0)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinActionOnVisit() @@ -214,7 +214,7 @@ public function test_getSelectQuery_whenJoinActionOnVisit() ) AS log_inner", "bind" => array(1, 'Test', 0)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinConversionOnAction() @@ -242,7 +242,7 @@ public function test_getSelectQuery_whenJoinConversionOnAction() ( log_link_visit_action.custom_var_k1 = ? AND log_conversion.idgoal = ? AND log_link_visit_action.custom_var_k2 = ? )", "bind" => array(1, 'Test', 1, 'Test2')); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinActionOnConversion() @@ -270,7 +270,7 @@ public function test_getSelectQuery_whenJoinActionOnConversion() ( ( log_conversion.idgoal IS NULL OR log_conversion.idgoal <> ? ) AND log_link_visit_action.custom_var_k1 = ? AND log_conversion.idgoal = ? )", "bind" => array(1, 2, 'Test', 1)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinConversionOnVisit() @@ -305,7 +305,7 @@ public function test_getSelectQuery_whenJoinConversionOnVisit() ) AS log_inner", "bind" => array(1, 1)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinConversionOnly() @@ -332,7 +332,7 @@ public function test_getSelectQuery_whenJoinConversionOnly() ( log_conversion.idgoal = ? )", "bind" => array(1, 1)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } public function test_getSelectQuery_whenJoinVisitOnConversion() @@ -360,7 +360,7 @@ public function test_getSelectQuery_whenJoinVisitOnConversion() ( (log_conversion.idgoal = ? OR HOUR(log_visit.visit_last_action_time) = ? ))", "bind" => array(1, 1, 12)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } /** @@ -391,7 +391,7 @@ public function test_getSelectQuery_whenJoinVisitAndConversionOnAction() HOUR(log_visit.visit_last_action_time) = ? AND log_conversion.idgoal = ? ", "bind" => array(12, 1)); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } /** @@ -429,7 +429,7 @@ public function test_getSelectQuery_whenJoinConversionAndActionOnVisit() ) AS log_inner", "bind" => array(1, 12, 'Test')); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } /** @@ -477,7 +477,7 @@ public function test_getSelectQuery_whenLimit_innerQueryShouldHaveLimit() $expected = array( "sql" => " SELECT - sum(log_visit.visit_total_time) as sum_visit_length + sum(log_inner.visit_total_time) as sum_visit_length FROM ( SELECT @@ -496,6 +496,6 @@ public function test_getSelectQuery_whenLimit_innerQueryShouldHaveLimit() LIMIT 33", "bind" => array(1, 'Test')); - $this->assertEquals($this->_filterWhitsSpaces($expected), $this->_filterWhitsSpaces($query)); + $this->assertEquals($this->_filterWhiteSpaces($expected), $this->_filterWhiteSpaces($query)); } }