Is there a way to disable or hide the #PHPUnit deprecations? I have 265 of them for data providers that aren’t static, and I can’t easily switch to static data providers, since many of the data providers call instance methods (i.e., $this). So, it’s going to take me a long time to upgrade my tests so that I can upgrade to PHPUnit 10.
I’m trying to run “Debug” (for step-debugging with #Xdebug) in #PhpStorm while running a #Pest test. I do this all the time with standard #PHPUnit tests, and I’ve never had this problem…
The test runner stops immediately, and PhpStorm reports in the debug console, “Test framework quit unexpectedly.”
Has anyone else seen this error? Do you know what causes it?
I have only recently learned of the "before" attribute in @phpunit. It seems appealing. What I don't get is... why would I ever use setUp() when I can instead use a before method? It seems like the easier, more portable solution in ever case except when I actively want to bypass a parent class's setUp().
#PHP folks, what framework-agnostic tooling (as in not #Symfony / #Laravel / #Laminas etc) are you using for running headless browser-based tests these days via something like #PHPUnit?
I'm looking at setting something up in #Docker on #macOS, I've tried Symfony Panther and it's been a shitshow of errors and not being able to get #Chrome or #Firefox running in Docker :/
If you install #PHPUnit using Composer (which is not the recommended way) then you can now use both PHPUnit 9.6 and PHPUnit 10.5 in projects that depend on either PHP-Parser 4 or PHP-Parser 5.
Looking at the #T3CON24 website, I do not see a Call for Papers. Is it already over? Will there be none? Am I blind? I would like to share what we have been up to in #PHPUnit land with the #TYPO3 community 😉
Trying to find a straightforward way to merge XML coverage reports generated by #phpunit via #CodeCeption. The end goal is a nice HTML report. I can generate the HTML report or XML for a single chunk, but none of the tooling I can find to combine the chunks works. There's an open bug in #phpcov which prevents the serialized PHP reports from being able to be combined.
I'd consider tools in php, python, node, rust, or binaries for mac or linux.
#PHPUnit 9 says to stop using assertObjectHasAttribute() in favor of assertObjectHasProperty(). But the latter doesn't exist in PHPUnit 9, only in PHPUnit 10.
Am I missing something obvious? Because that's not how deprecation warnings are supposed to work... #PHP
When to use a data provider vs multiple tests in #PHPUnit? Imho there are two requirements that would let me to pick data providers to test variants:
The input of the data provider is not used for if conditions that lead to different code being executed in the test.
The data provider input and output variables should fit on a single line, or if an array/object is part of the test dataset, a handful of lines at max.*
discovered livetechhelper.com, while the initiative could be positive explained, the execution is horrible! I found https://livetechhelper.com/repos/jaapio/phpunit
I can help with #phpunit but obviously any income should go to the original maintainers not to me because I created a fork!
Same applies to other projects, should we stop this?! #php#foss?
This Friday, February 16, 2024, from 10:00 to 12:00 (Europe/Berlin), I will explain the motivation behind the most important changes in #PHPUnit 11 and demonstrate them with live coding. We will cover new features as well as migrating from PHPUnit 10 to PHPUnit 11.
This online event is part of thePHP.cc's education flatrate, but is free and open to all.
Would you like to attend? Just send me an e-mail with the subject "PHPUnit 11 Live Demonstration" to sebastian@thephp.cc.
#PhpStorm needs to add little “play” buttons next to each of the #PHPUnit TestWith attributes.
Along these same lines, when I have a base test case that uses a data provider defined in child test classes, PhpStorm should be able to figure out that the method in the child is a data provider and add “play” buttons there, as well.
Looking for a #rector rule to change #phpunit@test@norden.social annotation to #[Test] attribute. Could only find something for '@dataProvider' and '@testWith`. Any pointers?
#phpc developers, sometimes when I run #phpunit I receive 100s of errors (in my integration tests) that might only originate from 2 lines. Is there a way to consolidate these based on stack trace?
Working on the #doctrineorm v1 codebase and its test suite, make you realise how much work has been done on #phpunit, and it simply works! Thank you @sebastian!
At the same time the legacy Doctrine v1 still manages OK-ish in the era of #php8 ! Still with no class namespaces and by implementing its own autoloading system! Is it probably from #php4 times? 🤔
Kudos to the original authors!
(Are they around here BTW?)