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