testing

  • Bootstrap 4 dropped the float grid

    Two and a half years in alpha, and the grid is flexbox now. The class renames are mechanical; the ones that changed meaning rather than name are not.

  • Mutation testing tells you what coverage does not

    Line coverage says a line executed during the suite. It does not say an assertion would have failed had that line been wrong, which is the question everyone…

  • Argument count errors are their own exception

    Calling a userland function with too few arguments used to be a warning that let execution continue with the parameter unset, which turned a call-site mistake into a…

  • PHPUnit 6 renamed the classes into a namespace

    Version 6 moved everything under PHPUnitFramework and left aliases for the old names, which are deprecated. Every test file extending PHPUnit_Framework_TestCase needs a line changing. The rename is…

  • Designing an API two mobile clients can live with

    Two apps, two release cycles, and neither can be forced to update. What is additive, what is not, and the decisions that have to be made before the…

  • Data providers run before setUp, every time

    A provider that builds its cases from something created in setUp() fails with a null, because every provider in the class runs before any test does — including…

  • Schema changes that do not need a maintenance window

    An ALTER on a 40 million row table held a metadata lock behind every query. Expand, migrate, contract turns one blocking release into three safe ones.

  • Laravel 5.5 and the packages that install themselves

    The first release where installing a package is one command. Auto-discovery removes two config edits per package, and hides the fact that they happened.

  • Analysing the tests as well as the source

    Test code is usually excluded from static analysis on the grounds that it is not production code, which is where a good proportion of the useful findings are…

  • Assert against the database, not against the response

    A feature test asserting a 302 and a flash message proves the controller ran. It does not prove the order was created, and it passes just as happily…