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

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

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