Robert Basic

Robert Basic headshot

Robert is a software engineer and PHP consultant. He doesn’t shy away from maintaining legacy applications and writing documentation, fixing bugs with the help of tests and believes communication with business stakeholders is the way to develop software. Loves contributing to open source, and is a core contributor to Mockery, a PHP mock object framework for use in unit testing. Author of pugdebug, a standalone debugging client for PHP that uses XDebug as the debugging engine.

twitter: @robertbasic


Easier Mocking with Mockery

By Robert Basic

Mockery tries to provide an easy to read and understand API, which is also versatile enough, so any scenario that might come up when working with mock objects in our test cases are covered. In this first part, we’ll see how Mockery can be used to create different test doubles and how they fit into a test suite.

Published in Testing in Practice – April 2018, April 2018

Easier Mocking with Mockery, Part 2

By Robert Basic

In part one, we laid the practical groundwork for using test doubles. Let’s explore the parts of Mockery that, in some cases, exit the realm of everyday usage and see how it can help us in dealing with scenarios we might have thought impossible to test like static method calls, spying on objects, and more.

Published in Treasure, Old & New – May 2018, May 2018