Posts marked with “phpunit”
Determining Code Coverage With PHPUnit
There are lots of ways that we can judge other developers’ code. A lot of them are subjective like spacing, function names, and class names. When we do code reviews these are not helpful methods to judge the code and we instead need to use a better method. We need to use non-subjective metrics like […]
Automated Testing Using PHPUnit
As developers, we spend a lot of time testing the code that we’ve written. Generally, this is a manual process where we write a little code and then manually enter some inputs to verify we get what we expect. What if instead of doing the same manual testing over and over again, we used a […]
Decrypting Cryptography
Change is hard at first, messy in the middle, and gorgeous at the end.—Robin Sharma PHP Architect is going through change, and we hope you follow us for the adventure.
Community Corner: PHPUnit Creator Sebastian Bergmann, Part Two
Welcome to part two of our interview with Sebastian Bergmann. Last month we heard about Sebastian’s beginnings, how he got started with development and what led him to write the de facto testing suite for the PHP programming language. This month, Sebastian dives into what it’s like managing such a widely used and crucial piece […]
It’s Really an Upgrade
We often consider improvements from what they’ll cost us, in time, effort, or money, in the short term and undervaluing the long-term benefits we’ll get. We cover practices that look daunting but are worthwhile in this issue, including PHP refactoring tools like Rector, Commands and Queries, PHP Unit, Strategic Domain-Driven Design, Livewire, and more.
Community Corner: PHPUnit Creator Sebastian Bergmann, Part One
When Sebastian Bergmann was in university, his professor pulled him to the side and said, “Open Source is great, PHP is great, but I see that you’re interested in these testing concepts, unit testing in particular. That does not exist for PHP. Can I finally convince you now to continue what you do, but with […]
Education Station: Unit Testing Basics
By Chris Tankersley Recently, we’ve discussed principles for writing clean code in your php applications. Testing is a valuable technique to help you produce and maintain a codebase, but it can be daunting to learn. In this article, we’ll start with unit testing. Let’s look at how tests help during the design phase and in […]
Education Station: Unit Testing Basics
Recently, we’ve discussed principles for writing clean code in your php applications. Testing is a valuable technique to help you produce and maintain a codebase, but it can be daunting to learn. In this article, we’ll start with unit testing. Let’s look at how tests help during the design phase and in maintenance, what unit tests are, and how to use PHPUnit for your test suite.
How to Learn PHP Unit Testing With Katas
Sometimes code is first tested when the unfortunate client or user feels like using the feature and tests the developer’s work. Hopefully, they’re not disappointed. That’s why you should be interested in unit testing and Test-Driven Development (TDD)—because it makes your life as a programmer better.
PHPUnit Worst Practices
I’ve been working with PHPUnit a lot, probably since 2007. Unit testing and automatic testing in general is important, and it becomes even more important when it comes to team play. Unfortunately, in different teams that I have worked in, I often observed a situation when tests don’t receive all the attention they deserve, sometimes […]