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

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

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

Usage Example

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