public function getInitialContext() { return $this->initialContext; }
/** * 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()); }