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

showErrors() public method

Based on the current environment configuration, should system errors be shown or not.
public showErrors ( ) : boolean
return boolean
    public function showErrors()
    {
        $reporting = $this->getEnvironmentConfig('ErrorReporting', false);
        if ($reporting && strtolower($reporting) == 'on') {
            return true;
        }
        return false;
    }

Usage Example

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