shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

265
active users

#mocking

0 posts0 participants0 posts today

I'm looking for a way to test my #PHP #Symfony application #BehaviourDriven using #TDD without getting into DI #mocking hell. Currently ~90% of my tests consist of (mockery) mocks and their expectations. Are there ways/approaches to reduce this mocking on unit test level and focus more on the expected behaviour of the functions without having to constantly adapt the mocks during refactorings?

Any ideas/ tools/ articles/ videos/ composer packages?

Continued thread

…but in case any of you want to do something similar, here’s me mocking a WritableStream using a Proxy to provide mock stdout and stderr streams to Console instances to capture the output and save them in my database:

codeberg.org/kitten/app/src/br

And here’s the actual monkeypatching code:

codeberg.org/kitten/app/src/br

Codeberg.orgapp/src/Logs.js at logsapp - A web development kit that’s small, purrs, and loves you.