This is especially covering:
* The behavior on different kinds of HTML encoded characters.
* Trimming, or more precisely the fact that the formatter currently does
not do all the trimming. There is a trim() call in the test that should
not be there. This will be reworked in a following patch.
Additionally:
* Prefer strict assertSame() where possible.
* Remove two assertions that don't help making the test more safe.
* Utilize the new `// phpcs:…` syntax.
Change-Id: Ic361f2644300dcef3fc972a2dc2ae19ad34fa513
This patch does two things:
* Add a testMemCacheHelpers() test for the setCache(), getFromCache(),
as well as cacheKey() methods.
* Simplify the existing test setup utilizing the PHPUnit4And6Compat
layer. I'm also replacing the Config mock with an actual HashConfig,
because that's a really trivial object that does not need to be mocked.
Change-Id: I7e8a62651a53919d338a7d921f548e941b671670
Instead of trying to come up with a (probably hypercomplex) integration
test for the entire API module, I start to test a few more critical
details. Yes, this is now testing private implementation details. This
is meant as a migration path. See, it's hard to test code like this
without rewriting it, and hard to rewrite it without tests. This patch
aims to give us a little more confidence for future rewrites.
Change-Id: I0405e13eba31124fcb5af83159d7438fe0ad9879