示例#1
0
 /**
  * @param Attribute $attribute
  *
  * @throws LightSamlValidationException
  *
  * @return void
  */
 private function validateAttribute(Attribute $attribute)
 {
     if (false == Helper::validateRequiredString($attribute->getName())) {
         throw new LightSamlValidationException('Name attribute of Attribute element MUST contain at least one non-whitespace character');
     }
 }
示例#2
0
 public function test_set_get_name_format()
 {
     $attribute = new Attribute();
     $attribute->setNameFormat($expected = 'format');
     $this->assertEquals($expected, $attribute->getNameFormat());
 }