It may be a method belonging to one of many classes. When the code accesses it, it may get an unexpected value. The testing approach is essentially the same. The difference is one of bookkeeping. The problem of testing function calls in OO is the same as testing code that takes a function as a parameter and then invokes it.
Inheritance is a convenient way of producing polymorphic functions.
At the call site, what matters is not the inheritance, but the polymorphism. Inheritance does make the search for test requirements more straightforward. As with functions, the process of testing variable uses doesn't essentially change, but you have to look in more places to decide what needs testing. OO functions are generally smaller. That means there are more opportunities for integration faults.