This is okay, if one needs only one or maybe two methods, but even with two this is already confusing, so I was always on the lookout to find a better solution.
/** Mock Customer */
//Add a magic method to the list of mocked class methods
$methods = \array_merge(
\get_class_methods(Customer::class),
['getCustomerType']
);
$this->customerModelMock = $this->getMockBuilder(Customer::class)
->setMethods($methods)
->disableOriginalConstructor()
->getMock();
//Now I can mock my magic method !
$this->customerModelMock->expects(static::any())
->method('getCustomerType')
->willReturn('professional');
Unfortunately this makes the only configurable methods the ones we provide with addMethods. So depending on the use case, one might want to mock better __call.