Loïc Faugeron continues his series of "Mars Rover" tutorial posts with the latest covering the driving of the rover.
In this series we're building the software of a Mars Rover, according to the following specifications. It allows us to practice the followings: Monolithic Repositories (MonoRepo), Command / Query Responsibility Segregation (CQRS), Event Sourcing (ES), Test Driven Development (TDD)
We just finished developing the first use case, so we can now get cracking on the second one, driving the rover.
As is tradition in this series, he starts with the phpspec testing, defining the
DriverRover spec requiring driving instructions to be provided. He generates the code for it and fills in the brief functional details handling the instruction property. He also adds in some validations as far as what instructions it can be given and re-runs the tests to ensure they all pass.