You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a base class for your tests that use the @Mock annotation and the class is not fully qualified in @var, it will fail to find the correct class.
Having looked into this a bit, some refactoring of how annotations work will likely solve the problem. You can get the ReflectionProperty::getDeclaredClass() to get the class that actually has the annotation and not the class you're specifically trying to mock. However, when we get the properties that have the @Mock annotation, we're only returning the string property names and not an instance of ReflectionProperty. This is the refactoring that would likely help.
The text was updated successfully, but these errors were encountered:
If you have a base class for your tests that use the
@Mock
annotation and the class is not fully qualified in@var
, it will fail to find the correct class.Having looked into this a bit, some refactoring of how annotations work will likely solve the problem. You can get the ReflectionProperty::getDeclaredClass() to get the class that actually has the annotation and not the class you're specifically trying to mock. However, when we get the properties that have the
@Mock
annotation, we're only returning the string property names and not an instance of ReflectionProperty. This is the refactoring that would likely help.The text was updated successfully, but these errors were encountered: