/** @BeforeSuite * @param BeforeSuiteScope $scope * * @throws \Exception */ public static function loadMagentoConfiguration(BeforeSuiteScope $scope) { $environment = $scope->getEnvironment(); if (!$environment->getSuite()->hasSetting('parameters')) { throw new \Exception('You must set the parameters scetion of the behat.yml'); } $parameters = $environment->getSuite()->getSetting('parameters'); if (!isset($parameters['magentoSettings'])) { throw new \Exception('You must include the magentoSetting in the behat.yml file'); } $magentoSetting = $parameters['magentoSettings']; self::$_magentoSetting = $magentoSetting; }
/** @BeforeSuite * @param BeforeSuiteScope $scope * * @throws \Exception */ public static function loadErrorDetectionConfiguration(BeforeSuiteScope $scope) { $environment = $scope->getEnvironment(); if (!$environment->getSuite()->hasSetting('parameters')) { $parameters['w3cValidationSettings']['errorThreshold'] = 0; } else { $parameters = $environment->getSuite()->getSetting('parameters'); } if (!isset($parameters['w3cValidationSettings'])) { throw new \Exception('You must include the errorDetectionSettings in the behat.yml file'); } $w3cValidationSettings = $parameters['w3cValidationSettings']; self::$_w3cValidationSettings = $w3cValidationSettings; }