/** * @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'); } }
public function test_set_get_name_format() { $attribute = new Attribute(); $attribute->setNameFormat($expected = 'format'); $this->assertEquals($expected, $attribute->getNameFormat()); }