getInfo() is undocumented currently.
abstract public static getInfo() would make sense for this purpose, but that's not possible, not only in PHP.
So it looks like there should be an interface for DrupalTestCase.
Since this is probably right, but highly debatable, I'm just throwing out the proposal in attached patch, not changing actual tests.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal8.test-interface.0.patch | 2.31 KB | sun |
Comments
Comment #1
sunAhem, okay, that could lead to problems down the line ;)
It means that all test cases are ignored unless they explicitly implement the interface. We'd have to be extremely careful and check that patches adding test cases actually implement the interface.
Investigating the idea of just fixing the documentation issue, I tried "implements" on the interface on the root class like this:
However, that means that the interface is automatically inherited. Hence, all child classes implement the interface, so this is always TRUE:
Going further, I tried whether additionally checking for getInfo() could resolve it:
but that still throws a fatal error for all base test classes:
Hence, the only option to document getInfo() is the patch in #0.
Comment #2
sunClosing in favor of #697760: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit)