Automattic/vip-scanner — pull request #219 by ockham (2014-12-08 00:24:50+00:00)
Title: Php check test base

PR based on [previous discussion](https://github.com/ockham/vip-scanner/commit/d9b44afc0f6e335b8c327e59504118753e0dc9a7#commitcomment-8851581)

It's really still inheritance-based, but I think I can justify that :smile:
Any test case that's supposed to cover a check will always feed some sample data -- e.g. as a file -- to that check, run the check, and compare the errors to a set of expected errors, so it's pretty invariably defined what part of a check's interface is used. OTOH, I think if someone needs to test their check, they won't (and shouldn't) test anything else which is vastly different from within the same test anyway, meaning I don't think we're obstructing anyone by doing this via inheritance (and preventing them from inheriting from a different parent class).

My main point against composition is that we would lose the diagnostics that PHPUnit's assertions have: if we factored out `individualCheck` and `assertEqualErrors` and had them just return false on failure, that would be a whole lot more coarse-grained than the present approach.