🐉 Boss: the lying tests

Exercise 6 of 6 in chapter 6 · 300 XP · 5 objectives checked by tests

Topics covered: Reliable testsTest dataPrecise assertions

Pippin has heard about tests. He wrote some, proudly: “All green, boss!”

Gorm sent for an inspector, Master Verifix, a gnome with a monocle. He read Pippin's tests, and he sighed. Then he secretly slipped four bugs into the tavern, just to see. Pippin's tests stayed all green.

Your mission

Make the tests in tests/Taverne/InspectionTest.php honest: they must still pass on the tavern as it is, but fail on each of Master Verifix's four bugs, the mutants 🐛.

Don't touch the application: it's the tests that are lying.

The classic lies of a test

A green test proves nothing until you have seen it turn red in front of a real bug. That's exactly what mutants do.

Master Verifix adjusts his monocle. He is waiting.