>_ phpunit.expert

Interactive online training

Better Testing

You know assertions, test doubles, and code coverage. But is that enough? Learn testing methods that go far beyond example-based testing. Find defects that stay undetected even at 100% code coverage. Directly from the creator of PHPUnit.

Online via Zoom Live & interactive
5 sessions 2 hours each
PHP & PHPUnit Methods for any language
990 EUR included in the flat rate

The idea

Green does not mean correct

AI agents generate more and more code, faster and faster. You write unit tests to make sure that this code works. Most people stop at example-based testing. A known output is verified for a known input. That works as long as everyone thinks of all the relevant cases. But what about the cases nobody thought of?

In this training you get to know methods with which you make sure that your tests really verify the right thing. You secure existing code before you change it. You automatically find edge cases you would never have thought of. And you understand why high code coverage alone is no guarantee of quality.

These methods are universal. They work in every programming language and with every test framework. I teach the concepts using PHP examples with the tools of the PHP ecosystem. You take the insights with you into any codebase. Whether PHP, C#, Go, Java, Python, Rust, or TypeScript.

The programme

Five sessions, five methods

Each session is devoted to one method that goes beyond example-based testing. Two hours, live and interactive. We work on real code, not on slides.

Session 01

Meaningful tests

2 hours
Observability & behaviour
  • Your test is green. But how do you know that it verifies the right thing?
  • What happens when your code produces correct results but has unwanted side effects?
  • How do you verify behaviour that is not expressed in a return value?
  • What do you do when you do not even know what the correct answer would be?
Session 02

Modernising safely

2 hours
Characterization tests
  • You are supposed to change code that nobody on the team understands. There are no tests and no documentation.
  • How can you modernise safely when you do not know what the code actually does?
  • How do you document the actual behaviour before you change anything?
  • How do you get from a safety net to a real test suite?
Session 03

What nobody thinks of

2 hours
Property-based testing
  • You test with examples, but you cannot write down all the examples. What do your tests miss?
  • How do you find edge cases you would never have thought of?
  • When a test fails, the input is often huge and incomprehensible. How do you get to the actual problem?
  • For which kinds of code is this approach worthwhile, and where does it reach its limits?
Session 04

The blind spot

2 hours
Mutation testing
  • You have high code coverage, but bugs still make it into production. Why?
  • Your tests are green, but would they even notice a real defect in the code?
  • How do you measure whether your tests are actually any good, beyond coverage numbers?
  • What do controlled defects in the code tell you about the quality of your test suite?
Session 05

What nobody expects

2 hours
Fuzzing
  • Your tests prove that your code is correct. But is it also robust?
  • What happens when your code receives input that nobody expected?
  • Why does even 100% code coverage not protect you from all defects?
  • How do you find security vulnerabilities before attackers do?

Who it is for

Experienced developers

This training is aimed at everyone who already has experience with automated tests and wants to broaden their testing methodology. The concepts are relevant regardless of the programming language you use. We implement the practical examples in PHP; you transfer the methods directly to other languages.

What you take away

  • You recognise when a green test is deceptive, and make sure that it verifies the right thing
  • You secure unknown code before you change it
  • You find edge cases you would never have thought of when writing tests by hand
  • You know what code coverage really tells you, and what it does not
  • You systematically verify the robustness of your code against unexpected input
  • You choose the right testing method for every situation and can justify your decision

What you bring

  • Experience in software development with an object-oriented programming language
  • Basic experience with automated tests, you write and run unit tests
  • Basic knowledge of PHP is helpful for the practical examples, but not strictly required
  • Curiosity about testing methods beyond your everyday work

Your trainer

Sebastian Bergmann

Sebastian Bergmann

Sebastian is the creator of PHPUnit, the de facto standard for testing PHP code. As a consultant, trainer, and co-founder of thePHP.cc he has been helping teams build maintainable and well-tested software for more than two decades.

In this training he shows you methods that he does not teach in this depth anywhere else. You work with him live on real code and ask your questions directly.

Sebastian Bergmann talking with a participant during a workshop
Practical exercises and direct feedback are part of every training. Photo: Filip Kovačević

Registration

990 EUR per person

Five interactive live sessions of two hours each, as a Zoom meeting. Small group, real code, your questions.