AppserverIo\Appserver\Core\ServerNodeConfigurationTest::testGetAuthentications PHP Метод

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

Checks whether the getAnalytics() method returns the expected result.
public testGetAuthentications ( ) : void
Результат void
    public function testGetAuthentications()
    {
        // initialize the array with expected result
        $authentications = json_decode(file_get_contents(__DIR__ . '/Api/Node/_files/prepareAuthentications.json'));
        // create a mock configuration instance
        $mockNode = $this->getMock('AppserverIo\\Appserver\\Core\\Api\\Node\\ServerNode', array('getAuthenticationsAsArray'));
        $mockNode->expects($this->once())->method('getAuthenticationsAsArray')->will($this->returnValue($authentications));
        // initialize the server node
        $serverNode = new ServerNodeConfiguration($mockNode);
        // check the array with the authentications data
        $this->assertSame($authentications, $serverNode->getAuthentications());
    }