Writing unit testing on a project can seem like a daunting task, and earning team and leadership buy-in can be challenging. Level up your skillset as we cover PHPUnit and Prophecy setup with composer, writing meaningful tests, restructuring existing classes with dependency injection to allow for unit testing, using mock objects, and releasing code confidently with test coverage. We'll also discuss overcoming common biases, unit testing challenges, and shortcomings of unit testing.

Comments

Please login to leave a comment

This was such a helpful talk. It really seemed to have something for everyone, and as a Junior dev, I was happy to learn some new things about Unit Testing that I can bring back to my team.

I liked the talk. Lots of good points. I wish there were more concrete examples for each point. For example, the point about what are problematic things for testing... Show me an example of a global function making testing difficult.

Cori Lint at 14:36 on 5 Nov 2022

I liked all the code examples!

Zachary Lee at 09:39 on 9 Nov 2022

Very good talk. As others have said, additional examples would have helped elevate this to 6 stars ;) but even still, it was quite Brilliant!

I think using the `add` method as an example throughout the whole talk would help bring continuity to the presentation. Start with the smaller `return $a + $b;` and by the end, we will have helped you build the more complicated final version through demonstrations of each of these unit testing concepts.