/** * @covers ::__construct * @covers ::registerAlias * @depends testGetConfig * @depends testGetLocator */ public function testConstructWithArgs() { $configMockClass = get_class($this->configMock); $locatorMockClass = get_class($this->locatorMock); $class = $this->testedClass; $customtestObj = new $class($configMockClass, $locatorMockClass); $this->assertTrue($this->readAttribute($customtestObj, 'instance') instanceof $class); $this->assertTrue($customtestObj->getConfig() instanceof $configMockClass); $this->assertEquals($customtestObj->getConfig(), \App::getConfig()); $this->assertTrue($customtestObj->getLocator() instanceof $locatorMockClass); $this->assertEquals($customtestObj->getLocator(), \App::getLocator()); }
/** * Returns the IServiceLocator object associated with the current App * * @return \rakelley\jhframe\interfaces\services\IServiceLocator */ protected function getLocator() { return \App::getLocator(); }