Ejemplo n.º 1
0
 /**
  * Test \Henhed\Piwik\Helper\Data::getBaseUrl
  *
  * Also covers `getHostname'
  *
  * @param string $hostname
  * @param bool $isSecure
  * @param string $returnValue
  * @dataProvider baseUrlDataProvider
  */
 public function testGetBaseUrl($hostname, $isSecure, $returnValue)
 {
     $this->_prepareScopeConfigMock(null, $hostname);
     // Test explicit `isSecure'
     $this->assertEquals($returnValue, $this->_helper->getBaseUrl(null, $isSecure));
     // Test implicit `isSecure'
     $this->_requestMock->expects($this->once())->method('isSecure')->will($this->returnValue($isSecure));
     $this->assertEquals($returnValue, $this->_helper->getBaseUrl());
 }
Ejemplo n.º 2
0
 /**
  * Get Piwik tracker URL
  *
  * @return string
  */
 public function getTrackerUrl()
 {
     return $this->_dataHelper->getBaseUrl() . 'piwik.php';
 }