The article continues the series of questions and answers about the problems of unit testing in PHP applications. In this part we’ll consider PHPUnit and mocking, such as disadvantages of the classical mocking framework and feature of its native alternative Prophecy, highlight common fallacies of how the test doubles should be used to make the object oriented design better.
This series of articles is an experimental attempt to explain problems of unit tests in PHP applications, turning the theory upside down. From my practice I know it well that even skilled developers often have difficulties with rearranging their OOP knowledge onto new test driven approach. I will try to share my experience with the subject in form of original questions and answers, that elucidate very important and not always obvious aspects of unit testing and clean code practices.
In the first part we’ll consider the common misunderstandings of the OOP and unit testing principles, that may lead to wrong perception of test driven design practices.
In the beginning of this story we used to cluster our Spark applications using Apache Yarn as our main Resource Manager. At that time we considered a RM more like a “Spark extension”, basically used to optimize Spark processes and nothing more. Our usage of Yarn then, never went beyond deploying those applications, monitoring them via web browser typing something like http://yarn.url:4040/<spark_app>.
This blog is meant to collects some of our experiences working with a variety of technologies everyday. Approaching very cutting edge systems, often leads us to go for custom solutions which is a real pity not to share.