In the case of $dataProvider = Phake::mock('\DataProviders\Popup'); $dataProvider is getting a mixed type instead of correctly being typed to the namespace. I'm working on a fix for this now.