Ok, so it shouldn't be possible to guess my IDE based on the extra clutter I've added to a class.

Admittedly the main purpose of the comments was to make it easier to *write* code - the fluent interface `$mock->expects()->with()->will()` etc. can be tedious to type. But, where there's a conflict, *reading* code is more important, so I probably shouldn't have done it.

Regarding which class to typehint, this would be needed to maintain the auto-completion:

    /** @var \Symfony\Component\Routing\Route|\PHPUnit_Framework_MockObject_MockObject */

...but it's not likely to be described as "elegant".

The other problem we have is repetition:

    private $route;
    private $route2;
    private $objectManager;
    private $objectManager2;
    private $managerRegistry;

Adding even the short-hand docblock comments takes up a lot of space.

For a group of private members like this where it's easy to see a common pattern, I don't think the type hints add anything to readability.

So unless you want this above each one:

    /**
     * @var \Symfony\Component\Routing\Route|\PHPUnit_Framework_MockObject_MockObject
     */

I'd rather take them out from the test.

In non-test classes, the Jackrabbit example above is good practice.