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

isProductionEnvironment() public method

Checks if current environment is Production.
    public function isProductionEnvironment()
    {
        return $this->getEnvironmentName() == 'Production';
    }

Usage Example

Example #1
0
 public function testIsProductionEnvironment()
 {
     $env = Environment::getInstance();
     $env->initializeEnvironment(__DIR__ . '/../DemoApp/');
     $app = new Application($env);
     $this->assertTrue($app->isProductionEnvironment());
 }