In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

markusstaab's tweet image. In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

New rule for #phpunit is coming...

rectorphp's tweet image. New rule for #phpunit is coming...

For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance. After a few micro optimizations I finally found something substantial. Proof of concept is 33% faster

markusstaab's tweet image. For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance.

After a few micro optimizations I finally found something substantial.

Proof of concept is 33% faster

Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future. this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

markusstaab's tweet image. Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future.

this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

I'm writing #phpunit tests ontop of a #laravel app. Something has lost its mind, every time I add 2 assertions this number increases by about 3000 I'm now at 14,000 assertions, when in actual fact I have about 25 haha.

dr4goonis's tweet image. I'm writing #phpunit tests ontop of a #laravel app.

Something has lost its mind, every time I add 2 assertions this number increases by about 3000

I'm now at 14,000 assertions, when in actual fact I have about 25

haha.

For a few weeks I am working on improvements for #phpunit #codecoverage features. Just relased a blog post detailling the approach and all the ideas and results including deep links into all the relevant pull requests. staabm.github.io/2025/11/26/spe…


When you see that beautiful sea of green in your test suite. #php #phpunit

rcsofttech85's tweet image. When you see that beautiful sea of green in your test suite.

#php #phpunit

I just put togehter a brief article which describes everthing new and noteworthy we shipped with the recent #phpstan #phpunit 1st party integration package staabm.github.io/2025/11/15/php…


Mocking methods is straightforward in #php using PHPUnit 🏝 But what about methods which are called more than once and might return different results? 🤔 Well that can be mocked also…watch me do it here👇 garyclarke.tech/courses/testin… #PHPUnit

garyclarketech's tweet image. Mocking methods is straightforward in #php using PHPUnit 🏝

But what about methods which are called more than once and might return different results? 🤔

Well that can be mocked also…watch me do it here👇

garyclarke.tech/courses/testin…

#PHPUnit

Todays #phpunit release contains a fix which makes sure the end-user at least gets a hint about a fatal error, even though php.ini was configured with display_errors=0

markusstaab's tweet image. Todays #phpunit release contains a fix which makes sure the end-user at least gets a hint about a fatal error, even though php.ini was configured with display_errors=0

Proposed a fix so #phpunit will exit with a error message in case a test calls exit() but does not use process isolation (so exits the PHPUnit process) before PHPUnit exited without notice Even worse, the test could exit(0), so the shell will not see a non-zero exit code wdyt?

markusstaab's tweet image. Proposed a fix so #phpunit will exit with a error message in case a test calls exit() but does not use process isolation (so exits the PHPUnit process)

before PHPUnit exited without notice

Even worse, the test could exit(0), so the shell will not see a non-zero exit code

wdyt?

Just made #PHPUnit output test errors in the same format the --filter cli option expects them. that way you can just copy the text and paste it 1:1 into the cli arg, to re-run a single test-case for a specific dataset. available in version PHPUnit 12.3+ #dx

markusstaab's tweet image. Just made #PHPUnit output test errors in the same format the --filter cli option expects them.

that way you can just copy the text and paste it 1:1 into the cli arg, to re-run a single test-case for a specific dataset.

available in version PHPUnit 12.3+

#dx

In the next #phpunit 12.x release the PHPT test runner will emit warnings, in case of fatal/parse-errors in --SKIPIF-- or --CLEAN-- sections. Until now these were swallowed without further notice

markusstaab's tweet image. In the next #phpunit 12.x release the PHPT test runner will emit warnings, in case of fatal/parse-errors in 
--SKIPIF-- or --CLEAN-- sections.

Until now these were swallowed without further notice

It took me awhile, but I’m now a believer in #Drupal Test Traits. I didn’t think I would ever need a reason to run #PhpUnit tests on an installed site, but (once again), I was wrong :) Thanks to Moshe, Jibran, and the other contributors. buff.ly/3VZ7pDf

ultimike's tweet image. It took me awhile, but I’m now a believer in #Drupal Test Traits. I didn’t think I would ever need a reason to run #PhpUnit tests on an installed site, but (once again), I was wrong :) Thanks to Moshe, Jibran, and the other contributors. 

buff.ly/3VZ7pDf

Mocking methods is fairly straightforward in #php using PHPUnit 🏝 But what about methods which are called more than once and might return different results? 🤔 Well that can be mocked also…watch me do it here👇 garyclarke.tech/courses/testin… #PHPUnit

garyclarketech's tweet image. Mocking methods is fairly straightforward in #php using PHPUnit 🏝

But what about methods which are called more than once and might return different results? 🤔

Well that can be mocked also…watch me do it here👇

garyclarke.tech/courses/testin…

#PHPUnit

PHPUnit is really flexible 🤸🏽 There are obvious ways to run your tests by folders etc. but the group attribute allows you to run (or not run) them by group association…cool 😎 Learn about testing PHP here: garyclarke.tech/p/testing-php #php #PHPUnit

garyclarketech's tweet image. PHPUnit is really flexible 🤸🏽

There are obvious ways to run your tests by folders etc. but the group attribute allows you to run (or not run) them by group association…cool 😎

Learn about testing PHP here:
garyclarke.tech/p/testing-php

#php #PHPUnit

Do you prefer setUp() over static methods for preparing dependencies in your unit tests? New rule in #phpunit @rectorphp set helps you solve it 😇

VotrubaT's tweet image. Do you prefer setUp() over static methods 
for preparing dependencies in your unit tests?

New rule in #phpunit @rectorphp set 
helps you solve it 😇

Full house at Sebastian Bergmann's Session about PHPUnit 10. On another Stage, @Girgias tells the audience how to contribute to PHP. #IntPHPcon #php #phpunit

phpconference's tweet image. Full house at Sebastian Bergmann's Session about PHPUnit 10.
On another Stage, @Girgias tells the audience how to contribute to PHP.

#IntPHPcon #php #phpunit
phpconference's tweet image. Full house at Sebastian Bergmann's Session about PHPUnit 10.
On another Stage, @Girgias tells the audience how to contribute to PHP.

#IntPHPcon #php #phpunit

If you still say that there are no advantages to using @pestphp instead of #phpunit for #php or #laravel testing, I don't know what else to say 🤷🏻‍♂️

devajmeireles's tweet image. If you still say that there are no advantages to using @pestphp  instead of #phpunit for #php or #laravel testing, I don't know what else to say 🤷🏻‍♂️
devajmeireles's tweet image. If you still say that there are no advantages to using @pestphp  instead of #phpunit for #php or #laravel testing, I don't know what else to say 🤷🏻‍♂️

For a few weeks I am working on improvements for #phpunit #codecoverage features. Just relased a blog post detailling the approach and all the ideas and results including deep links into all the relevant pull requests. staabm.github.io/2025/11/26/spe…


Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future. this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

markusstaab's tweet image. Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future.

this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

🚀 Laravelプロジェクトのテスト導入で困ってませんか?設計段階からPHPUnitを意識した9つのテクニックを紹介!関数設計・定数定義・テスト環境整備など、後からのテスト導入負担を大幅削減できます。コード品質向上の第一歩🎯 #Laravel #PHPUnit #テスト駆動開発 #PHP


🎉 30 years of PHP & 25 years of PHPUnit! In his IPC keynote, Sebastian Bergmann looks back at how testing shaped modern PHP — and why it matters for your code today  💡Watch the Keynote: phpconference.com/blog/30-years-… #IntPHPcon #PHP #PHPUnit


I just put togehter a brief article which describes everthing new and noteworthy we shipped with the recent #phpstan #phpunit 1st party integration package staabm.github.io/2025/11/15/php…


PHPUnit 12.4 adds regex filtering for #[IgnoreDeprecations] + reusable data providers. Sebastian Bergmann breaks it down. Full TDT summary: bit.ly/4nSSYv5 #PHP #PHPUnit #Testing #DevTools

thedroptimes's tweet image. PHPUnit 12.4 adds regex filtering for #[IgnoreDeprecations] + reusable data providers.
Sebastian Bergmann breaks it down.

Full TDT summary: bit.ly/4nSSYv5 

#PHP #PHPUnit #Testing #DevTools

For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance. After a few micro optimizations I finally found something substantial. Proof of concept is 33% faster

markusstaab's tweet image. For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance.

After a few micro optimizations I finally found something substantial.

Proof of concept is 33% faster

📊 The State of PHP 2025 — Which testing frameworks do developers actually use? According to the latest survey, #PHPUnit remains the dominant choice, with 50%, but interestingly, #Pest continues to gain traction, reaching 17% this year. @enunomaduro @PHPUnit

MilwadDev's tweet image. 📊 The State of PHP 2025 — Which testing frameworks do developers actually use?

According to the latest survey, #PHPUnit remains the dominant choice, with 50%, but interestingly, #Pest continues to gain traction, reaching 17% this year.

@enunomaduro @PHPUnit

Confused about whether to opt for PHPUnit or Kernel testing in your Drupal project? 💡 Our article simplifies the choice and guides you through their effective implementation! 👉 specbee.com/blogs/write-yo… #drupal #phpunit #drupaldevelopment #softwaretesting #codequality


In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

markusstaab's tweet image. In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

Started cooking a new #phpstan builtin rule which detects problems in #phpunit dataprovider data. 👨‍🍳 I am already in love with it 😅


A big thank you goes out to @jetbrains and the @phpstorm team, which started sponsoring my open source work. I am really proud that more and more companies believe in my open source efforts and can see value generated with #phpstan, #phpunit, #rector...


Writing tests for PHP isn’t just smart, it’s essential. Build confidence in your code one test at a time! ✅ #PHPUnit #DevTips


🔧 John Locke’s @freelock Drupal Flake now supports PHPUnit testing! A Nix-based local dev alt to Docker, tested on Drupal 11.2 + PHP 8.3. Details + commands: bit.ly/4mwq8Qg #Drupal #PHPUnit #Testing #Nix

thedroptimes's tweet image. 🔧 John Locke’s @freelock  Drupal Flake now supports PHPUnit testing!

A Nix-based local dev alt to Docker, tested on Drupal 11.2 + PHP 8.3.

Details + commands: bit.ly/4mwq8Qg 

#Drupal #PHPUnit #Testing #Nix

New rule for #phpunit is coming...

rectorphp's tweet image. New rule for #phpunit is coming...

In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

markusstaab's tweet image. In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰

📊 The State of PHP 2025 — Which testing frameworks do developers actually use? According to the latest survey, #PHPUnit remains the dominant choice, with 50%, but interestingly, #Pest continues to gain traction, reaching 17% this year. @enunomaduro @PHPUnit

MilwadDev's tweet image. 📊 The State of PHP 2025 — Which testing frameworks do developers actually use?

According to the latest survey, #PHPUnit remains the dominant choice, with 50%, but interestingly, #Pest continues to gain traction, reaching 17% this year.

@enunomaduro @PHPUnit

Update PHPUnit to version 10 and make use of attributes. #php #phpunit

rcsofttech85's tweet image. Update PHPUnit to version 10 and make use of attributes.

#php #phpunit
rcsofttech85's tweet image. Update PHPUnit to version 10 and make use of attributes.

#php #phpunit

I'm writing #phpunit tests ontop of a #laravel app. Something has lost its mind, every time I add 2 assertions this number increases by about 3000 I'm now at 14,000 assertions, when in actual fact I have about 25 haha.

dr4goonis's tweet image. I'm writing #phpunit tests ontop of a #laravel app.

Something has lost its mind, every time I add 2 assertions this number increases by about 3000

I'm now at 14,000 assertions, when in actual fact I have about 25

haha.

Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future. this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

markusstaab's tweet image. Looks like #phpunit xml code-coverage generation could get nearly twice as fast in the future.

this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance. After a few micro optimizations I finally found something substantial. Proof of concept is 33% faster

markusstaab's tweet image. For a few days I am using the vacation from my primary job to improve #phpunit code coverage performance.

After a few micro optimizations I finally found something substantial.

Proof of concept is 33% faster

Laravel testing tip 😎 Using data providers in PHPUnit can simplify your testing and allow for more comprehensive testing scenarios. Check out this example of using a data provider in a unit test to update user data: #PHPUnit #testing

h_ik04's tweet image. Laravel testing tip 😎
Using data providers in PHPUnit can simplify your testing and allow for more comprehensive testing scenarios. Check out this example of using a data provider in a unit test to update user data: #PHPUnit #testing

Yesterday I hunted down a performance regression in #phpunit 11.x and 12.x when big objects (e.g. ReflectionClass) are used in dataproviders, in comparison to phpunit 10.x Proposed a fix, short discussion with Sebastian Bergmann, and here we go: Fix released today. love it.

markusstaab's tweet image. Yesterday I hunted down a performance regression in #phpunit 11.x and 12.x when big objects (e.g. ReflectionClass) are used in dataproviders, in comparison to phpunit 10.x

Proposed a fix, short discussion with Sebastian Bergmann, and here we go: Fix released today.

love it.

submitted 3 fixes for @rectorphp bugs related to #phpunit dataprovider and covers annotation. happy test-migrations

markusstaab's tweet image. submitted 3 fixes for @rectorphp  bugs related to #phpunit dataprovider and covers annotation.

happy test-migrations

Mocking methods is straightforward in #php using PHPUnit 🏝 But what about methods which are called more than once and might return different results? 🤔 Well that can be mocked also…watch me do it here👇 garyclarke.tech/courses/testin… #PHPUnit

garyclarketech's tweet image. Mocking methods is straightforward in #php using PHPUnit 🏝

But what about methods which are called more than once and might return different results? 🤔

Well that can be mocked also…watch me do it here👇

garyclarke.tech/courses/testin…

#PHPUnit

Just discovered the power of "phpunit --testdox". Not only does it produce clean output, but it also helps detect slow tests!!💥 #php #phpunit #laravel #moonguard

rondevz's tweet image. Just discovered the power of "phpunit --testdox". Not only does it produce clean output, but it also helps detect slow tests!!💥

#php #phpunit #laravel #moonguard

Mocking methods is fairly straightforward in #php using PHPUnit 🏝 But what about methods which are called more than once and might return different results? 🤔 Well that can be mocked also…watch me do it here👇 garyclarke.tech/courses/testin… #PHPUnit

garyclarketech's tweet image. Mocking methods is fairly straightforward in #php using PHPUnit 🏝

But what about methods which are called more than once and might return different results? 🤔

Well that can be mocked also…watch me do it here👇

garyclarke.tech/courses/testin…

#PHPUnit

When you see that beautiful sea of green in your test suite. #php #phpunit

rcsofttech85's tweet image. When you see that beautiful sea of green in your test suite.

#php #phpunit

PHPUnit is really flexible 🤸🏽 There are obvious ways to run your tests by folders etc. but the group attribute allows you to run (or not run) them by group association…cool 😎 Learn about testing PHP here: garyclarke.tech/p/testing-php #php #PHPUnit

garyclarketech's tweet image. PHPUnit is really flexible 🤸🏽

There are obvious ways to run your tests by folders etc. but the group attribute allows you to run (or not run) them by group association…cool 😎

Learn about testing PHP here:
garyclarke.tech/p/testing-php

#php #PHPUnit

While working on migration from #PHP 7.4 to 8.2 I've stumble upon unit test failure when using #PHPUnit's `assertSame()` on array: order of elements was different. The solution is to use `assertEqualsCanonicalizing()` which sorts arrays before comparing. docs.phpunit.de/en/9.5/asserti…

_Codito_'s tweet image. While working on migration from #PHP 7.4 to 8.2 I've stumble upon unit test failure when using #PHPUnit's `assertSame()` on array: order of elements was different.

The solution is to use `assertEqualsCanonicalizing()` which sorts arrays before comparing.

docs.phpunit.de/en/9.5/asserti…

There is hope - start to add #phpunit to #typo3 extensions. Who is also doing stuff like this?

nevercodealone's tweet image. There is hope - start to add #phpunit to #typo3 extensions. Who is also doing stuff like this?

After todays #phpunit contributions, I am among the TOP 10 contributors of the project :-) please consider #sponsoring my #freetime #opensource work :)

markusstaab's tweet image. After todays #phpunit contributions, I am among the TOP 10 contributors of the project :-)

please consider #sponsoring my #freetime #opensource work :)

Cloning #PHPUnit repo on train's WiFi is... quite an unique experience 😂. I guess I'll do it when I arrive at hotel 🤷‍♂️.

_Codito_'s tweet image. Cloning #PHPUnit repo on train's WiFi is... quite an unique experience 😂. I guess I'll do it when I arrive at hotel 🤷‍♂️.

Loading...

Something went wrong.


Something went wrong.


United States Trends