PHPUnit_Framework_Assert::readAttribute

Returns the value of an attribute of a class or an object.

This also works for attributes that are declared protected or private.