How to create phpunit mock objects from namespaced classes

If the autoloader is enabled:

$mock = $this->getMockBuilder('MyNamespacesubClassToMock')
                   ->setMethods(array('methodToMock', 'methodToMock2'))
                   //->disableOriginalConstructor()
                   ->getMock();

works in phpunit 3.6.7, with or without a namespace specified at the top of the test class.