public function getLocaleAllowedValidator($intlExtension = false, $allowedLocales = array(), $strictMode = false) { $allowedLocalesProvider = new AllowedLocalesProvider($allowedLocales); $validator = new LocaleAllowedValidator($allowedLocalesProvider, $strictMode, $intlExtension); $validator->initialize($this->context); return $validator; }
public function testValidateEmptyLocale() { $validator = new LocaleAllowedValidator(); $validator->validate(null, $this->getMockConstraint()); $validator->validate('', $this->getMockConstraint()); }