test command symfony with phpunit
Method 'getDisplay()' returns a string as you can see from the Api doc:http://api.symfony.com/3.0/Symfony/Component/Console/Tester/CommandTester.html and you're assigning that string to your $output variable.I think what you need is 'getOutput()'