sebastianbergmann/phpunit — pull request #859 by agop (2013-03-13 14:15:22+00:00)
Title: Attribute validations added to assert methods

- Added additional validation of attribute name in assertions using class/object attributes
- Added new Test in Tests/Framework/AssertTest.php to cover attribute validation

Validating class/object attribute against regex:

```php
if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'valid attribute name');
}
```

Result:
```
PHPUnit_Framework_Exception: Argument #2 (No Value) of PHPUnit_Framework_Assert::readAttribute() must be a valid attribute name
```