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
In some custom rules, I need to make few decisions based on the current parent class or few things like that, by using is_a() or by calling static methods on the class being modified, when it implements an interface with this given static method.
Everything works like a charm, except when it comes to test my rules. I need the classes which are present in the .php.inc files to be autoloaded.
Currently the only (poor) solution I've found is to create a "mirror" class, with same namespace, name, extends... than the one being tested through the .php.inc files.
This solution is far from ideal. How do you deal with such cases?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
In some custom rules, I need to make few decisions based on the current parent class or few things like that, by using
is_a()
or by calling static methods on the class being modified, when it implements an interface with this given static method.Everything works like a charm, except when it comes to test my rules. I need the classes which are present in the
.php.inc
files to be autoloaded.Currently the only (poor) solution I've found is to create a "mirror" class, with same namespace, name, extends... than the one being tested through the
.php.inc
files.This solution is far from ideal. How do you deal with such cases?
thanks a lot for your answer!
Beta Was this translation helpful? Give feedback.
All reactions