One of the dangers of testing is locking down an implementation. Tests should make it easier to refactor not harder. Tests that don’t focus on the public interface tend to lock down implementation.
Extending a class let’s you come in the back door and fiddle with non public stuff. That puts the focus of testing in the wrong place.