Sebastian Bergmann :phpunit: · @sebastian
1364 followers · 554 posts · Server phpc.social

The last code sprint was four (!) years ago:

phpunit.de/code-sprints/septem

Teaser: The next one will be in March in Hamburg. Details: soon.

#phpunit

Last updated 1 year ago

PHPUnit · @phpunit
537 followers · 60 posts · Server phpc.social
Martin Herndl · @herndlm
117 followers · 737 posts · Server phpc.social

was debugging a flaky test with executionOrder="defects" configured. it took me quite a while to figure out that the code under test was dependent on a constant and that constant was set in only one test case (which _sometimes_ ran before the others which would break them)..

replaced the constant with something else that can be properly mocked and all is good. phew.

#phpunit

Last updated 1 year ago

Sebastian Bergmann · @sebastian
102 followers · 46 posts · Server thephpcc.social

Wer testet eigentlich meine ?

Die Antwort auf diese Frage gibt es ab 27. Oktober in meiner zum Thema für mit und .

📢 Details: thephp.cc/schulungen/mutation-

📅 Termine: thephp.cc/termine?ref=mastodon

#tests #online #schulung #mutationtesting #php #phpunit #infection

Last updated 1 year ago

github.com/ghostwriter · @ghostwriter
5 followers · 48 posts · Server phpc.social

For the next version of `ghostwriter/psalm-plugin`, we'll be able to listen to all of @psalm events and dispatch a custom events and listeners using `ghostwriter/container` and `ghostwriter/event-dispatcher`.

#phpunit #psalmphp #mockery #psr11 #psr14 #php

Last updated 1 year ago

Tim Van Dijck · @timvandijck
133 followers · 244 posts · Server mas.to

Tip: if you need to fix a bunch of phpUnit tests you can add flags so that your tests stop running at the first error/failure. This way you can go and fix them one by one.

#laravel #phpunit

Last updated 1 year ago

github.com/ghostwriter · @ghostwriter
6 followers · 40 posts · Server phpc.social

Is this an acceptable format to display testdox error messages in 10.x using `--testdox`?

does anyone have any suggestions for alternative format?

Related: github.com/sebastianbergmann/p

#phpunit

Last updated 1 year ago

github.com/ghostwriter · @ghostwriter
6 followers · 38 posts · Server phpc.social
Ben Ramsey :enfys: · @ramsey
3524 followers · 8190 posts · Server phpc.social

Since no longer has `expectWarning()` and `expectNotice()`, how are folks handling these? :phpunit:

#phpunit #php

Last updated 1 year ago

github.com/ghostwriter · @ghostwriter
5 followers · 34 posts · Server phpc.social

for 10+

we need a custom printer that skips/ignores `PhpunitDeprecationTriggeredEvent`

then run this command to disable default printer.

// vendor/bin/phpunit --no-progress

#phpunit

Last updated 1 year ago

github.com/ghostwriter · @ghostwriter
5 followers · 33 posts · Server phpc.social

Suppress deprecations

// phpunit.xml:

<phpunit bootstrap="tests/Unit/bootstrap.php"

// tests/Unit/bootstrap.php:

<?php declare(strict_types=1);

error_reporting(E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED );

require 'vendor/autoload.php';

#phpunit

Last updated 1 year ago

Ben Ramsey :enfys: · @ramsey
3524 followers · 8190 posts · Server phpc.social

Is there a way to disable or hide the 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.

#phpunit

Last updated 1 year ago

PHPUnit · @phpunit
532 followers · 58 posts · Server phpc.social
Sebastian Bergmann · @sebastian
102 followers · 42 posts · Server thephpcc.social

You want to learn how to get started with automated testing for your software?

The next instance of my "Test Automation with " training starts at the end of September.

Details: thephp.cc/training/test-automa

Dates: thephp.cc/dates

Interested? Send an email to team@thephp.cc!

#php #phpunit

Last updated 1 year ago

PHPUnit · @phpunit
532 followers · 58 posts · Server phpc.social
Larry Garfield · @Crell
1234 followers · 5718 posts · Server phpc.social

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...

#phpunit #php

Last updated 1 year ago

Sebastian Bergmann · @sebastian
102 followers · 41 posts · Server thephpcc.social

Here is the material that I used today for my presentation on 10 at :

thephp.cc/presentations/phpuni

#phpunit #froscon

Last updated 1 year ago

Sebastian Bergmann · @sebastian
102 followers · 40 posts · Server thephpcc.social

Auf der Konferenz in Kiel werde ich im Oktober zeigen, was sich bei @php@fosstodon.org und @phpunit in letzter Zeit getan hat:

thephp.cc/termine/was-ist-neu-

#contao #php #phpunit

Last updated 1 year ago

PHPUnit · @phpunit
532 followers · 58 posts · Server phpc.social
PHPUnit · @phpunit
523 followers · 53 posts · Server phpc.social