/**
  * @dataProvider provider_is_valid
  *
  * @param $type
  * @param $expected
  */
 public function test_is_valid($type, $expected)
 {
     $this->assertSame($expected, LaunchKey_WP_Implementation_Type::is_valid($type));
 }
 /**
  * @param array $input
  * @param array $errors
  * @param array $options
  * @return string
  */
 private function process_implementation_type($input, &$errors, &$options)
 {
     $implementation_type = isset($input[LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE]) ? trim($input[LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE]) : null;
     if (empty($implementation_type)) {
         $errors[] = $this->wp_facade->__('You must select an implementation type', $this->language_domain);
     } elseif (!LaunchKey_WP_Implementation_Type::is_valid($implementation_type)) {
         $errors[] = $this->wp_facade->__('An invalid implelementation type was submitted', $this->language_domain);
     } else {
         if (isset($options[LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE]) && LaunchKey_WP_Implementation_Type::WHITE_LABEL === $options[LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE] && LaunchKey_WP_Implementation_Type::WHITE_LABEL !== $implementation_type && isset($options[LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME]) && 'LaunchKey' !== $options[LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME] && (empty($input[LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME]) || 'LaunchKey' !== $input[LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME])) {
             $input[LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME] = 'LaunchKey';
             $errors[] = $this->wp_facade->__('App Display Name was reset as the Implementation Type is no longer White Label', $this->language_domain);
         }
         $options[LaunchKey_WP_Options::OPTION_IMPLEMENTATION_TYPE] = $implementation_type ?: null;
     }
     return $implementation_type;
 }