Closed PhMemmel closed 3 months ago
Hi @PhMemmel ,
If you are writing a testcase from which you wish to extend your own test classes, you must name it as *_testcase
and declare it abstract
.
All test classes must have names ending *_test
and be declared final
.
The final
and abstract
classes are mutually exclusive and do not make sense.
Basically, rename your base class as a testcase
and declare it as abstract.
Ah, understood the structure. Thank you very much for the quick response. Your solution works perfectly.
In a plugin a wrote a bunch of tests which are pretty similar. So I have a abstract class from which my test classes inherit. Unfortunately phpcs currently triggers a warning for this abstract class (
moodle.PHPUnit.TestClassesFinal.UnitTestClassesFinal
), because it's not final. However, I'm struggeling to declare an abstract class as final. I feel in this case there should be no warning.