PHPUnit_Framework_Assert::getObjectAttribute

Returns the value of an object's attribute.

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