AppserverIo\Appserver\Core\ServerNodeConfiguration::getAnalytics PHP Метод

getAnalytics() публичный Метод

Returns analytics
public getAnalytics ( ) : string
Результат string
    public function getAnalytics()
    {
        return $this->analytics;
    }

Usage Example

 /**
  * Checks whether the getAnalytics() method returns the expected result.
  *
  * @return void
  * @todo
  */
 public function testGetAnalytics()
 {
     // initialize the array with expected result
     $analytics = json_decode(file_get_contents(__DIR__ . '/Api/Node/_files/prepareAnalytics.json'));
     // create a mock configuration instance
     $mockNode = $this->getMock('AppserverIo\\Appserver\\Core\\Api\\Node\\ServerNode', array('getAnalyticsAsArray'));
     $mockNode->expects($this->once())->method('getAnalyticsAsArray')->will($this->returnValue($analytics));
     // initialize the server node
     $serverNode = new ServerNodeConfiguration($mockNode);
     // check the array with the analytics data
     $this->assertSame($analytics, $serverNode->getAnalytics());
 }