Returns the initial context instance.
public getInitialContext ( ) : AppserverIo\Appserver\Application\Interfaces\ContextInterface | ||
리턴 | AppserverIo\Appserver\Application\Interfaces\ContextInterface | The initial Context |
/** * Test if the getter/setter for the initial context works. * * @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()); }