Logan Bailey

Adventures In Web Development

Blog, About, GitHub, and LinkedIn

PHPUnit Quick Tip - Type Hint Your Mocks

February 6th, 2017
Type hinting your properties, specifically your mock objects, in your tests can go a long way to create a more seamless and developer friendly test suite. For a long time, I suffered through static code analysis errors where I was supplying mocks to my concrete objects. But with these short steps, I solved those problems.