Webiny\Component\Bootstrap\ApplicationClasses\Application::getEnvironmentName PHP Method

getEnvironmentName() public method

Get the name of current environment.
public getEnvironmentName ( ) : string
return string
    public function getEnvironmentName()
    {
        return $this->environment->getCurrentEnvironmentName();
    }

Usage Example

Example #1
0
 public function testGetEnvironmentName()
 {
     $env = Environment::getInstance();
     $env->initializeEnvironment(__DIR__ . '/../DemoApp/');
     $app = new Application($env);
     $this->assertSame('Production', $app->getEnvironmentName());
 }