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

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

Returns handlers
public getHandlers ( ) : array
Результат array
    public function getHandlers()
    {
        return $this->handlers;
    }

Usage Example

 /**
  * Checks whether the getHandlers() method returns the expected result.
  *
  * @return void
  * @todo
  */
 public function testGetHandlers()
 {
     // initialize the array with expected result
     $handlers = 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('getFileHandlersAsArray'));
     $mockNode->expects($this->once())->method('getFileHandlersAsArray')->will($this->returnValue($handlers));
     // initialize the server node
     $serverNode = new ServerNodeConfiguration($mockNode);
     // check the array with the handlers data
     $this->assertSame($handlers, $serverNode->getHandlers());
 }