>_ phpunit.expert

Interactive online training

Advanced PHPUnit

Are your tests slow, fragile, or hard to understand? Learn proven strategies for solving exactly these problems systematically. First-hand: from Sebastian Bergmann, the creator of PHPUnit.

Online via Zoom Live & interactive
6 sessions 2 hours each
For advanced users Building on PHPUnit practice
1199 EUR included in the flat rate

The idea

Is your test suite slowing you down?

Do your tests run too slowly because they access the database or the file system? Do you have fragile tests that are green one time and red the next, without anything having changed? Or are your tests so hard to understand that nobody dares to touch them?

These problems have causes. And they have proven solutions:

Slow tests

Tests that access the database or the file system cost you time on every run. Targeted isolation makes them fast.

Fragile tests

Green one time, red the next, without a change to the code. Clean test isolation and correctly used test doubles make tests reliable.

Incomprehensible tests

Tests that nobody dares to touch help nobody. Readable tests document what your code is supposed to do.

PHPUnit

In this training you learn how to isolate dependencies with PHPUnit in a targeted way, use test doubles correctly, and use code coverage as a tool rather than an end in itself. Afterwards you know how to make your tests fast, stable, and readable. And how to keep them that way.

From the contents

From fragile tests to a reliable safety net

Six sessions of two hours each, live and interactive. With plenty of room for your questions from everyday project work.

  1. 01

    Test isolation

    Why shared fixtures and missing isolation lead to fragile tests. And how you prevent that.

  2. 02

    Testing collaborating objects

    Verifying communication between objects in a targeted way.

  3. 03

    Using test doubles correctly

    When a test stub is enough and when you really need a mock object.

  4. 04

    Getting I/O under control

    Testing the database, the file system, email, and other side effects cleanly.

  5. 05

    Code coverage as a compass

    Interpreting reports correctly, setting sensible goals, and understanding what coverage really tells you.

  6. 06

    Recognising and fixing risky tests

    What PHPUnit tells you about the quality of your tests.

  7. 07

    Writing readable tests

    Eliminating mystery guests, cryptic assertions, and other obstacles to understanding.

  8. 08

    Speeding up slow test suites

    Strategies for faster execution in everyday project work.

Who it is for

For everyone who already uses PHPUnit

This training is aimed at developers who already use PHPUnit but struggle with slow, fragile, or hard to maintain tests. If you have the feeling that your test suite is slowing you down instead of backing you up, you are in the right place.

What you take away

  • Concrete solutions for the most common problems with tests in everyday project work
  • A clear understanding of test isolation, test doubles, and how to use them correctly
  • Strategies for using code coverage sensibly and for tracking down code that is not tested yet
  • Faster, more stable, and more readable tests: and the knowledge of how to keep them that way

What you bring

  • Practical experience with PHPUnit: you already write tests
  • Knowledge of object-oriented programming in PHP
  • The fundamentals are covered by the Test Automation with PHPUnit training
  • Your questions from everyday project work: they make the training better for everyone
A very informative and helpful training with many anecdotes from real life. The questions that were submitted were addressed at length and answered in great detail.
A participant of the training in June 2025

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.

You learn PHPUnit first-hand here: from the person who wrote it. Live, with answers to your questions and anecdotes from real projects.

Sebastian Bergmann helping a participant with an exercise on their laptop
Sebastian helps a participant at a workshop. Photo: Filip Kovačević

Registration

1199 EUR per person

Six interactive live sessions of two hours each, as a Zoom meeting. Small group, your questions, concrete answers.