Exemplo n.º 1
0
 public function testCreateInstanceWithConfigFile()
 {
     $configFile = dirname(__FILE__) . '/_fixtures/piwik.ini';
     $config = new Zend_Config_Ini($configFile, 'piwik');
     $piwik = new Zend_Service_Piwik($config);
     $this->assertEquals('http://demo.piwik.org', $piwik->getHost());
     $this->assertEquals('7', $piwik->getIdSite());
     $this->assertEquals('json', $piwik->getFormat());
     $this->assertEquals('anonymous', $piwik->getTokenAuth());
     $this->assertEquals('previous7', $piwik->getDate());
 }
Exemplo n.º 2
0
 /**
  * Magic method to call $method with $params
  *
  * @param string $method
  * @param array  $params
  *
  * @method mixed getCustomVariables
  *
  * @return string
  */
 public function __call($method, $params)
 {
     $name = $this->_module . '.' . $method;
     return $this->_piwikInstance->queryApi($name, $params);
 }