assertEquals( false, … ) still succeeds when the actual value is 0, null,
an empty string, even an empty array. All these should be reported as a
failure, I would argue.
Note this patch previously also touched assertSame( false ). I reverted
these. The only benefit would have been consistency within this codebase,
but there is no strict reason to prefer one over the other. assertFalse()
and assertSame( false ) are functionally identical.
Change-Id: Ic5f1c7d504e7249002d3184520012e03313137b4
assertSame() is guaranteed to not do any type conversion. This can be
critical when acciden tially comparing, for example, 0 to 0.0.
Change-Id: Iffcc9bda69573623ba14af655dcd697d0fcce525
Use PHPUnit's Xml::load() to validate that all tags and attributes
are balanced.
Use simple assertEquals or assertRegexp for the specific parts.
Change-Id: I25796954a3bb9903e88256b8345ef751c767d7d5
* Rename to getLinkClasses() since it's not really returning colours,
but CSS classes.
* Dependency inject LinkCache into LinkRenderer
* Update all callers of Linker::getLinkColour(), and mark it as
deprecated (no other uses in Gerrit)
* Update a bunch of tests for new dependency
Change-Id: Id178e2dcc60b833ce2dbad4920896b93cabba1bf
The unit tests spend nearly half of their run time resetting the user table for
each test. But the majority of tests do not depend on the user table having the
exact value that the setup code resets it to, and do not need to modify the
user objects they require to run.
Fix that by providing an API for tests to get User objects, and to indicate
whether the User object will be subject to destructive modification or not.
This allows User objects to be reused across multiple unit tests.
Change-Id: I17ef1f519759c5e7796c259282afe730ef722e96
The message is used during the string "Some user (Talk | contribs |
block)". There, it's used as a general noun, which shouldn't be
capitalized.
This message has been not capitalized on en.wp since 2009
Bug: T99225
Change-Id: I0c18ada9a6a0224f76e14e52f6da1cbfa81e68dd
* Remove redundant @licence/@license from test suite files.
They already have full licence headers. And @licence raises a
warning in Doxygen.
* Fix weird messes of comments inside comments and other things.
Change-Id: I38da8ca76330f72b8dc22b0ecf1ea69d5ea55ede
Was added with I873f6b86007000a94337f0c963df4bf8fec5b715,
but patch set was older than the remove from sql
in I4a9c2fa813d1f25dfb755e564f7677a212934d7b.
Change-Id: I6e938c3d0b67470225f53cc5229f7669a7cd8f0b
This makes it more feasible for Wikibase, Flow, etc. to support
enhanced changes format, and allow better support for the rc_source
column in the future.
Change-Id: I873f6b86007000a94337f0c963df4bf8fec5b715