You don't need that actually. PHPUnit has a "getMockForTrait" (or createObjectForTrait), I don't remember the exact syntax.