AppserverIo\Appserver\Application\ApplicationTest::testInjectGetInitialContext PHP Method

testInjectGetInitialContext() public method

Test if the getter/setter for the initial context works.
public testInjectGetInitialContext ( ) : void
return void
    public function testInjectGetInitialContext()
    {
        // define the methods to mock
        $methodsToMock = array('getClassLoader', 'newInstance', 'newService', 'getAttribute', 'getSystemLogger', 'getSystemConfiguration', 'getLogger');
        // create a mock instance
        $mockInitialContext = $this->getMock('AppserverIo\\Appserver\\Application\\Interfaces\\ContextInterface', $methodsToMock);
        // check if the passed instance is equal to the getter one
        $this->application->injectInitialContext($mockInitialContext);
        $this->assertEquals($mockInitialContext, $this->application->getInitialContext());
    }