Release PHPUnit 13.1.13 · sebastianbergmann/phpunit

Fixed #6681: XML assertions such as assertXmlStringEqualsXmlString() regressed into treating comments as significant Learn how to install or update PHPUnit 13.1 in the documentation. Keep up to ...

GitHub
Release PHPUnit 12.5.28 · sebastianbergmann/phpunit

Fixed #6681: XML assertions such as assertXmlStringEqualsXmlString() regressed into treating comments as significant Learn how to install or update PHPUnit 12.5 in the documentation. Keep up to ...

GitHub
Release PHPUnit 13.1.12 · sebastianbergmann/phpunit

Fixed #6673: Empty PHP settings from the parent process override per-test -d settings forwarded to child processes (breaks PCOV coverage) Learn how to install or update PHPUnit 13.1 in the docum...

GitHub
Release PHPUnit 12.5.27 · sebastianbergmann/phpunit

Fixed #6673: Empty PHP settings from the parent process override per-test -d settings forwarded to child processes (breaks PCOV coverage) Learn how to install or update PHPUnit 12.5 in the docum...

GitHub

Coding on the weekends:
(It's Memorial Day in the US, so today still counts as weekend.)

I have a `schema(): string` method. It returns JSON. Writing tests (because I'm a TDD person). I've come across a thing with #PHPUnit that surprised me a little.

There is no assertion for `assertJsonStringContainsJsonString()`. So I am making do with `assertStringContainsString()` where I want to test parts of the JSON without having to deal with the entire thing.

Is there a better way?

I have learnt more from the failures of PHPUnit than its successes. Over the last 25 years, I have witnessed the evolution of testing philosophy from a marginal practice to the bedrock of modern software development. But has the PHP community learned the right lessons?

In this presentation, I share what I have learned from #PHPUnit, how my approach has evolved (sometimes unexpectedly), and my thoughts on the future of software development in the age of AI:

https://phpc.tv/w/axWt1TZmzso1quVQxjo8n3

Past, Present, Future: The PHPUnit Story, Sebastian Bergmann / PHP Conference Odawara

PeerTube

Every two months, alongside each #PHPUnit feature release, I send subscribers a detailed walkthrough of the new features: what they do, how they are implemented, and why they were added. It's the context the ChangeLog doesn't cover.

PHPUnit 13.2 is less than two weeks away: high time for me to start working on the next issue of my newsletter. And high time for you to subscribe, if you have not done so already:

https://phpunit.de/newsletter

Newsletter-Anmeldung

Mit unserem Newsletter verpassen Sie keine Neuigkeiten mehr. Jetzt anmelden und auf dem Laufenden bleiben!

You can make HTTP requests in #Drupal Kernel tests! Your tests run faster and are easier to debug! I've updated the documentation page on it https://www.drupal.org/docs/develop/automated-testing/phpunit-in-drupal/making-http-requests-programmatically-in-kernel-tests and you can also read my block post for an overview: https://www.noreiko.com/blog/speed-your-phpunit-browser-tests-one-trick #PHPUnit #ttd
Making HTTP requests programmatically in Kernel tests

HTTP requests using drupalGet() While in general, Functional tests are designed for the testing of page loads, it's possible to test these in Kernel tests too. The advantage is that Kernel tests are much faster to run, because they only set up what they need to. The faster running time is particularly useful if many different combinations need to be tested for. The trade-off is that some aspects of the Drupal site are not available, such as form submissions and session handling, and that more set-up is required (but you only set up the elements the test needs).

Drupal.org
Release PHPUnit 13.1.11 · sebastianbergmann/phpunit

Fixed PHP setting values containing = need to be quoted before forwarding via -d Learn how to install or update PHPUnit 13.1 in the documentation. Keep up to date with PHPUnit: You can follow @...

GitHub
Release PHPUnit 12.5.26 · sebastianbergmann/phpunit

Fixed PHP setting values containing = need to be quoted before forwarding via -d Learn how to install or update PHPUnit 12.5 in the documentation. Keep up to date with PHPUnit: You can follow @...

GitHub