In our next practice session, we need to build a class that will automatically translate a number into its roman numeral counterpart. As with the previous episode, we'll use TDD and PHPSpec to drive this process.
Homework: what would happen if the user passed 0 to our converter? Shouldn't we take exception to that? On your own, implement this functionality using TDD.
View the source for this lesson (and the homework solution) on GitHub.
Published on Nov 11th, 2015.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.