mastouille.fr est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Mastouille est une instance Mastodon durable, ouverte, et hébergée en France.

Administré par :

Statistiques du serveur :

695
comptes actifs

#phpunit

2 messages1 participant0 message aujourd’hui

Anyone who uses Paratest: do you have to do anything special to get it to run your test bootstrap per process? I have vlucas/phpdotenv loading env vars in my bootstrap, but when running with Paratest, none of the env vars are present.

I’ve tried using --bootstrap, and that doesn’t help.

I’m using $_ENV to access the env vars, in case that matters.

A couple of years ago I wrote a #php script that mucks around with some system files. Because I didn't want to break my system while testing the code, I wrote some relatively tedious tests in #phpunit with mock objects, validating the parameters that were passed down to the filesystem.

It was a real pain in the butt, but I got the thing debugged without making a mess of my working environment.

Today I decided to add a new feature, and there's no way to express how much time having all that stuff set up saved. I copied a similar test, adapted it to the new feature, got it to pass tests, and deployed it without issue.

Coding a good test suite pays back over, and over, and over again.

This will be a crazy week: today and tomorrow I am at #LaraconEU and on Friday I will release #PHPUnit 12.

Why don't you join me on Friday for a two-hour, free-to-attend, online session?

phpunit.de/test-smarter-not-ha

I will talk about PHPUnit 12, of course, and share unique insights on how to get the most out of PHPUnit in 2025.

phpunit.deTest Smarter, Not HarderJoin Sebastian Bergmann to celebrate the release of PHPUnit 12, learn the motivation behind the changes in this new major version, and experience new features in live coding.

Looking for #phpunit code coverage dark-themes, are you using it?

Did not find any native support from PHPunit's tools, just some drop-in custom.css files.

Found so far just 2 of them:
1. github.com/chriswpage/phpunit- (updated 2024)

2. github.com/Porthorian/phpunit- (updated 2022)

From my preliminary research: the coverage tool is using bootstrap v4, while a dark-mode was only introduced in v5.3.

I should not dig into that migration path, or should I? 😅

GitHubGitHub - chriswpage/phpunit-coverage-theme: Drop in css file for a dark phpunit coverage themeDrop in css file for a dark phpunit coverage theme - chriswpage/phpunit-coverage-theme

Upgraded a #Symfony app from v5.4 to 6.4 in a couple of hours. Smooth process thanks to the recipes system and #Rector!
Well, some pitfalls are still around the corner, like (1) the split of the messenger-* component which dropped the doctrine transport, and (2) the new routing config via its recipe which by default uses #php Attributes.

The rest all smooth! Thank you all!

Sadly I discover that Rector did not rewrite #phpunit annotations to attributes, maybe because I use phpunit as phar? 🤔