/**
  * Ensure the consumerAssertionUrl is correct for this environment
  *
  * @param $forEnv
  */
 private function validateConsumerAssertionURL($forEnv)
 {
     // Ensure the assertion consumer service location exists
     $consumerAssertionUrl = $this->service->getAssertionConsumerServiceUrlForEnvironment($forEnv);
     if (null === $consumerAssertionUrl) {
         $this->errors[] = _t('RealMeSetupTask.ERR_CONFIG_ASSERTION_SERVICE_URL', '', '', array('env' => $forEnv));
         // no point in validating an invalid/missing url.
         return;
     }
     $urlParts = parse_url($consumerAssertionUrl);
     if ('localhost' === $urlParts['host'] || 'http' === $urlParts['scheme']) {
         $this->errors[] = _t('RealMeSetupTask.ERR_CONFIG_ASSERTION_SERVICE_URL', '', '', array('env' => $forEnv));
     }
 }