public function getWebPath() { $webPath = $this->environment->getCurrentEnvironmentConfig()->get('Domain', false); if (!$webPath) { $webPath = Request::getInstance()->getCurrentUrl(true)->getDomain() . '/'; } return $webPath; }
public function testGetWebPath() { $env = Environment::getInstance(); $env->initializeEnvironment(__DIR__ . '/../DemoApp/'); $app = new Application($env); $this->assertSame('http://www.myapp.com/', $app->getWebPath()); }