The two test functions are identical. They can as well use a single
@dataProvider to do the same as before. No coverage is lost.
Change-Id: I865b75f8e14e016ad4aa7ffdcf9e4023387b40bb
With PHPUnit 9, tests without @covers tags are considered risky and emit
warnings. Not having @covers is bad practice anyway, so use
@coversNothing instead to make the intention clear, and re-enable the
phpcs rule.
Also rewrite an assertion in ResourcesTest that was bothering me.
Bug: T243600
Change-Id: I6dd683f93b6b2faed5f107be2ca7860602277fbc
This adds an option to the schema generating maintenance scripts to
validate abstract schemas and schema changes and a structure test to
validate exisiting schemas and schema changes. Schemas are also
validated when generating.
The validation for the schema doesn't impose limits on table, index or
column names as I couldn't find any reliable conventions for them.
The structure tests only cover MediaWiki itself as there is no
convention on where extensions store their abstract schema.
Ideally, auto detection would be possible for sql/, but for now
extensions have to define their own (thankfully trivial) tests.
A couple of invalid definitions were fixed thanks to these tests.
I aimed to be thorough, but not all parts of the abstract schema
are completely clear, and Doctrine's documentation is not complete.
As a result, not everything has a description field.
Bug: T298320
Change-Id: I681d265317d4d1584869142ebb23d4098c06885f