Subclassing sounds fine. You could also try PHPUnit's `$this->readAttribute()` method.