7
gintko
12d

Last year for company I work I made OAuth server + SSO discriminated by business unit in php. Well it was quite complex project and security sensitive, so I wrote tests for every piece of code. Then I made client for it with abstractions to be easily extendable, but was too lazy write tests for it.

Anyway, today needed to add new grant auth strategy. Thought, I could also write tests for the client this time. That was the mistake...

I installed codeception (testing framework), tested every class, and then left the main client class for the end where all http communication and other magic happens.

So turns out, I can’t capture function parameters with codeception (at least its not documented), so I can’t assert if data in the end is correct. I mean it’s fucking abstraction on top of phpunit, which can do that, so what the fuck? But ok I probably could just use phpunit, but anyway why the fuck you would create mock abstraction with only 20% of functionality from original implementation? It doesn’t make fucking sense...

In addition, I was testing code written with guzzle http (http client), and that is some pile of shit. Just why the fuck I need to write 20 lines of code just to get a fucking json response...

Fuck this shit, I am not going to test it anymore, it just makes me hate php, I barely can deal with all that angryness inside me.

Comments
Your Job Suck?
Get a Better Job
Add Comment